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' |