This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name 20-0.com — Show Player Ratings | |
| // @namespace https://www.20-0.com/ | |
| // @version 0.2 | |
| // @description Injects each player's hidden OVR rating next to their name during the draft. | |
| // @match https://www.20-0.com/play* | |
| // @match https://www.20-0.com/daily* | |
| // @updateURL https://gist.github.com/preraku/0583fda749febd5f12fb7e8cce899d2d/raw/20-0-ratings.user.js | |
| // @downloadURL https://gist.github.com/preraku/0583fda749febd5f12fb7e8cce899d2d/raw/20-0-ratings.user.js | |
| // @grant none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from bs4 import BeautifulSoup | |
| import json | |
| import time | |
| def scrape_oscars(url): | |
| headers = { | |
| "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7", | |
| "Accept-Encoding": "gzip, deflate, br, zstd", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| import requests | |
| GET_NEW_ACCESS_TOKEN = False | |
| if GET_NEW_ACCESS_TOKEN: | |
| # Create and send an authorization request to Spotify | |
| client_id = 'CLIENT_ID' | |
| client_secret = 'CLIENT_SECRET' | |
| auth_url = 'https://accounts.spotify.com/api/token' |