AliAkhtari78 / SpotifyScraper

Spotify Scraper to extract all the information from spotify, download mp3 with cover of the song
https://spotifyscraper.readthedocs.io/en/latest
MIT License
137 stars 18 forks source link

{'ERROR': 'The provided url is malformed.'} #12

Open KathyGCY opened 2 years ago

KathyGCY commented 2 years ago

The example doesn't work1 {'ERROR': 'The provided url is malformed.'}

michaeldomanek commented 2 years ago

@KathyGCY I wanted to try out get_track_url_info() I added string = unquote(string) to _str_to_json and get_track_url_info() works now

    def _str_to_json(string: str) -> dict:
        string = unquote(string)
        json_acceptable_string = string.replace('\n', '').strip()
        converted_string = yaml.load(json_acceptable_string, Loader=yaml.FullLoader)
        return converted_string

I think every function is outdated and needs to be changed, but I guess the project will not be updated

eliamazzon commented 2 years ago

The example doesn't work1 {'ERROR': 'The provided url is malformed.'}

Same here.

eliamazzon commented 2 years ago

@KathyGCY I wanted to try out get_track_url_info() I added string = unquote(string) to _str_to_json and get_track_url_info() works now

    def _str_to_json(string: str) -> dict:
        string = unquote(string)
        json_acceptable_string = string.replace('\n', '').strip()
        converted_string = yaml.load(json_acceptable_string, Loader=yaml.FullLoader)
        return converted_string

I think every function is outdated and needs to be changed, but I guess the project will not be updated

Tried but didn't work for me.

michaeldomanek commented 2 years ago

I used from urllib.parse import unquote I cloned the project and checked the example again and it works for me, maybe wrong import

But I think the offical spotify API offers everything this project offers so I think you should use it instead.