Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing Error When Pulling Tracks #17

Open
mclopes opened this issue Nov 29, 2023 · 0 comments
Open

Parsing Error When Pulling Tracks #17

mclopes opened this issue Nov 29, 2023 · 0 comments

Comments

@mclopes
Copy link

mclopes commented Nov 29, 2023

Hello, I am getting the following error when trying to pull tracks from any genre.

From what I can understand, its no longer able to parse the top 100 data into a readable JSON?

has anyone else ran into this issue and resolved it?

[+] Fetching Top 100 Afro House Tracks
HTTP Status Code: 200
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><link rel="canonical" hrefLang="en" href="https://www.beatport.com/genre/Afro-House/89/top-100"/><link rel="alternate" hrefLang="de" href="https://www.beatport.com/de/genre/Afro-House/89/top-100"/><link rel="alternate" hrefLang="fr" href="https://www.beatport.com/fr/genre/Afro-House/89/top-100"/><link rel="alternate" hrefLang="es" href="https://www.beatport.com/es/genre/Afro-House/89/t
Accessed URL: https://www.beatport.com/genre/Afro-House/89/top-100
Redirect history: []
Blob content: 
Blob is empty
Traceback (most recent call last):
  File "/Users/marcelo/beatporter.py", line 30, in <module>
    top_100_charts[genre] = beatport.get_top_100_tracks(genre)
  File "/Users/marcelo/beatport.py", line 102, in get_top_100_tracks
    return parse_tracks(raw_tracks_dict)
  File "/Users/marcelo/beatport.py", line 77, in parse_tracks
    for track in tracks_json["tracks"]:
TypeError: 'NoneType' object is not subscriptable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant