couldbejake / spotify2mp3

Simple free and unlimited Spotify playlist downloads. Spotify2mp3 - Spotify Downloader
MIT License
270 stars 42 forks source link

[BUG] #9

Closed saiftheboss7 closed 2 years ago

saiftheboss7 commented 2 years ago

After yesterday's fixes, I tried today again but facing this issue after running the script

`View Count: 1,70,10,808টি ভিউ Duration: 3:42

Traceback (most recent call last): File "/Users/saif/Downloads/spotify2mp3/run.py", line 276, in main() File "/Users/saif/Downloads/spotify2mp3/run.py", line 270, in main download_playlist(spotify_url_link, playlist_name) File "/Users/saif/Downloads/spotify2mp3/run.py", line 182, in download_playlist yt_vid_obj = yt_dl_obj.streams.filter(only_audio=True).first() File "/opt/homebrew/lib/python3.9/site-packages/pytube/main.py", line 295, in streams self.check_availability() File "/opt/homebrew/lib/python3.9/site-packages/pytube/main.py", line 210, in check_availability status, messages = extract.playability_status(self.watch_html) File "/opt/homebrew/lib/python3.9/site-packages/pytube/main.py", line 102, in watch_html self._watch_html = request.get(url=self.watch_url) File "/opt/homebrew/lib/python3.9/site-packages/pytube/request.py", line 53, in get response = _execute_request(url, headers=extra_headers, timeout=timeout) File "/opt/homebrew/lib/python3.9/site-packages/pytube/request.py", line 37, in _execute_request return urlopen(request, timeout=timeout) # nosec File "/opt/homebrew/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen return opener.open(url, data, timeout) File "/opt/homebrew/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open response = meth(req, response) File "/opt/homebrew/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response response = self.parent.error( File "/opt/homebrew/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error return self._call_chain(args) File "/opt/homebrew/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain result = func(args) File "/opt/homebrew/Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 429: Too Many Requests`

couldbejake commented 2 years ago

It looks like you tried to download too many songs in a short space of time.

Are you able to download songs now that some time has elapsed?

saiftheboss7 commented 2 years ago

Hi @couldbejake - I tried again today after your comment and faced this new issue

CleanShot 2022-06-02 at 16 56 35@2x

Including the log file here failed_log.txt

couldbejake commented 2 years ago

It looks like pytube has been slightly broken by a API change from YouTube.

There's a temporary patch available, to install do the following:

pip3 uninstall pytube

python3 -m pip install git+https://github.com/JazPin/pytube

If you have any other questions feel free to open another ticket.

saiftheboss7 commented 2 years ago

Just wanted to mention it's fixed now. @couldbejake Thanks for the awesome script! 🙌 🎉

couldbejake commented 2 years ago

Just wanted to mention it's fixed now. @couldbejake Thanks for the awesome script! 🙌 🎉

Good to hear, thank you very much!