Code Monkey home page Code Monkey logo

beatporter's Issues

i know nothing about how to do this

can some please help me run this - this is exactly what i need - i have been doing it all one by one for days now - i would really really appreciate if someone could help me with a simpler step by step - this is my first time trying something like this - my email is [email protected]

Thank you for Beatporter

Thank you for this great tool. I have no programming skills but I followed your detailed guide and got everything up and running successfully! Thank you for this great tool!

Genres have Changed

Beatport added "Organic House / Downtempo" as a new genre, renamed Electronica / Downtempo" to just "Electronica" and removed "Hardcore / Hard Techno" some while ago. I already updated the config.example.py and opened a pull request.

Parsing Error When Pulling Tracks

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

Some Performance improvement ideas

Hey,

first of all thanks for the fantastic tool, have been using it since a year and helped me a lot :).
I have some ideas to speed up the scrapping process:

  • Have a cache for matched songs, like beatport release title and spotify song id.
  • If possible multiple threads, maybe one per genre/playlist.

Let me know what you think.

Kind regards
Chris

Getting a 404 Error from Spotify on certain tracks.

Hi,

I've been running this script for about a year but recently I started getting an error. I am running on terminal on OSX.

It seems some tracks are returning a 404 error. Its unfortunately happening with the first track on the all genres playlist but if i remove that playlist and go straight to Afro House it finds some tracks and works as normal until one returns a 404.

Is there any way to skip a track if it returns a 404?

Any help that you can provide will be greatly appreciated.

[+] Searching for track: World Hold On feat. Steve Edwards (Fisher Rework, Extended Mix) by Bob Sinclar on World Hold On (feat. Steve Edwards) [Fisher Rework, Extended Mix]
	[+] Search Query: World Hold On feat. Steve Edwards Fisher Rework, Extended Mix Bob Sinclar World Hold On (feat. Steve Edwards) [Fisher Rework, Extended Mix]
**HTTP Error for GET to https://api.spotify.com/v1/search returned 404 due to Not found.**
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/spotipy/client.py", line 245, in _internal_call
    response.raise_for_status()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/search?q=World+Hold+On+feat.+Steve+Edwards+Fisher+Rework%2C+Extended+Mix+Bob+Sinclar+World+Hold+On+%28feat.+Steve+Edwards%29+%5BFisher+Rework%2C+Extended+Mix%5D&limit=10&offset=0&type=track

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/marcelo/beatporter.py", line 36, in <module>
    spotify.add_new_tracks_to_playlist(genre, top_100_charts[genre])
  File "/Users/marcelo/spotify.py", line 247, in add_new_tracks_to_playlist
    track_id = search_for_track(track)
  File "/Users/marcelo/spotify.py", line 135, in search_for_track
    search_results = spotify.search(query)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/spotipy/client.py", line 547, in search
    return self._get(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/spotipy/client.py", line 291, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/spotipy/client.py", line 261, in _internal_call
    raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/search?q=World+Hold+On+feat.+Steve+Edwards+Fisher+Rework%2C+Extended+Mix+Bob+Sinclar+World+Hold+On+%28feat.+Steve+Edwards%29+%5BFisher+Rework%2C+Extended+Mix%5D&limit=10&offset=0&type=track:
 Not found., reason: None
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.