-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
bugSomething isn't workingSomething isn't working
Description
import json
from spotify_scraper import SpotifyClient
client = SpotifyClient(cookie_file='spotify_cookies.txt', headers={
'Authorization': 'Bearer BQDXsHPaTVtNVIprEnzrsw-sq6SZQuwv7WHkPjbWlM5s5bKgzLsNr1SkY6YL8-Drn-YHIUU6Fdt6qX7QtfxkQ5QZaIP3KhGFnNYq3m_s46Y8HmNxYJYG9xL75Yt1tOATwseLuxxxxx'},
browser_type='selenium',
use_webdriver_manager=True
)
track_url = "https://open.spotify.com/track/6rqhFgbbKwnb9MLmUQDhG6"
print(client)
print(type(client.browser.driver))
# try add cookies mannually
with open("spotify_cookies.txt", "r", encoding="utf-8") as f:
cookies = json.load(f)
client.browser.driver.get(track_url)
for cookie in cookies:
if isinstance(cookie.get('expiry'), float):
cookie['expiry'] = int(cookie['expiry'])
cookie['sameSite'] = 'None'
cookie['domain'] = 'spotify.com'
client.browser.driver.add_cookie(cookie)
result = client.get_track_info_with_lyrics(track_url)
print(json.dumps(result))this is my code. I want to get spotify lyrics, but it not work. and I event add cookies mannually. please have a look. Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working