spotify-downloader: HTTP Error 403 and Youtube Error 403 (exceeded quota). Program halts without downloading.
- Using latest version as provided on the master branch
- Searched for similar issues including closed ones
What is the purpose of your issue?
- Bug
- Feature Request
- Question
- Other
Description
When attempting to download music from a previously-parsed spotify playlist, the program exits with an error about “403: The request cannot be completed because you have exceeded your quota”.
If you need any further information, please let me know!
Log
$ python ./spotdl.py -l ./playlist.txt -f /d/Music\ 02/ --log-level DEBUG
DEBUG: Python version: 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)]
DEBUG: Platform: Windows-10-10.0.14393-SP0
DEBUG: {'album': None,
'avconv': False,
'config': None,
'download_only_metadata': False,
'dry_run': False,
'file_format': '{artist} - {track_name}',
'folder': 'D:/Music 02/',
'input_ext': '.m4a',
'list': './playlist.txt',
'log_level': 10,
'manual': False,
'music_videos_only': False,
'no_metadata': False,
'no_spaces': False,
'output_ext': '.mp3',
'overwrite': 'prompt',
'playlist': None,
'song': None,
'username': None}
INFO: Preparing to download 3 songs
DEBUG: Fetching metadata for given track URL
DEBUG: Fetching lyrics
<<(Truncated Meta Output)>>
DEBUG: query: {'part': 'snippet', 'maxResults': 50, 'type': 'video', 'q': 'Arctic Monkeys - R U Mine?'}
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pafy\util.py", line 34, in call_gdata
data = g.opener.open(url).read().decode('utf-8')
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./spotdl.py", line 185, in <module>
download_list(text_file=const.args.list)
File "./spotdl.py", line 79, in download_list
download_single(raw_song, number=number)
File "./spotdl.py", line 116, in download_single
content = youtube_tools.go_pafy(raw_song, meta_tags)
File "C:\Users\Jason Cemra\Downloads\spotify-downloader-master\core\youtube_tools.py", line 22, in go_pafy
track_url = generate_youtube_url(raw_song, meta_tags)
File "C:\Users\Jason Cemra\Downloads\spotify-downloader-master\core\youtube_tools.py", line 84, in generate_youtube_url
data = pafy.call_gdata('search', query)
File "C:\ProgramData\Anaconda3\lib\site-packages\pafy\util.py", line 42, in call_gdata
raise GdataError(errmsg)
pafy.util.GdataError: Youtube Error 403: The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (10 by maintainers)
I don’t think I remember what account I used to generate API keys anymore but even if we could monitor, we couldn’t have done much. Since, as @vn-ki mentioned:
300 songs for user per day is not really an abuse/overuse.
So far, scraping YouTube by default and additionally have an option for users to set an API key for better stability/faster response time seems a good idea to me.
@ritiek Just ran a test then with a 50 song playlist, after generating my own API key. Speeds are good, no worries with the API quota!
Thanks again!