Give a proper error message for 429 errors

These occur when too many requests are coming from a Tor exit node.
Before, there would be an error page with an exception instructing users to report the issue.
But this is an expected and persistent issue.
This commit is contained in:
James Taylor
2020-01-31 20:06:15 -08:00
parent cd4a2fb0eb
commit f787e4e202
6 changed files with 49 additions and 3 deletions

View File

@@ -88,6 +88,7 @@ def get_playlist_page():
gevent.spawn(get_videos, playlist_id, page)
)
gevent.joinall(tasks)
util.check_gevent_exceptions(*tasks)
first_page_json, this_page_json = tasks[0].value, tasks[1].value
info = yt_data_extract.extract_playlist_info(this_page_json)