Closed MBCX closed 9 months ago
I previously mention something like this before here #178. But that was temporary (for whatever reason), but now it seems to be consistent.
I have the same issue on macOS:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Applications/youtube-local-2.8.4/youtube/channel.py", line 464, in get_channel_page
return get_channel_page_general_url('https://www.youtube.com/channel/' + channel_id, tab, request, channel_id)
File "/Applications/youtube-local-2.8.4/youtube/channel.py", line 380, in get_channel_page_general_url
util.check_gevent_exceptions(*tasks)
File "/Applications/youtube-local-2.8.4/youtube/util.py", line 602, in check_gevent_exceptions
raise task.exception
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/Applications/youtube-local-2.8.4/youtube/channel.py", line 234, in get_channel_tab
content = util.fetch_url(
File "/Applications/youtube-local-2.8.4/youtube/util.py", line 359, in fetch_url
raise FetchError(str(response.status), reason=response.reason,
youtube.util.FetchError: HTTP error during request: 500 Internal Server Error
I think the best approach is to give up on using the browse API for channels since YouTube breaks it so often, and switch to the Uploads From playlist. All channel ids start with UC. If you replace this with UU, it is becomes the id for a playlist with all the user's uploads (youtube-local gets the channel video count from this playlist already). So you get easy pagination using an API that's already well known and that YouTube hasn't changed since the first time I implemented it.
This would also alleviate the need to maintain separate Shorts and Streams tabs since the playlist includes everything - the latest playlist page from YouTube even provides a way to filter out shorts but not streams.
The only thing that would be missing is sorting by views
same issue on linux, (this is youtube-local, i just renamed it yt-local)
Traceback (most recent call last):
File "/home/aadi/.local/src/yt-local/env/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aadi/.local/src/yt-local/env/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aadi/.local/src/yt-local/env/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aadi/.local/src/yt-local/env/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aadi/.local/src/yt-local/youtube/channel.py", line 464, in get_channel_page
return get_channel_page_general_url('https://www.youtube.com/channel/' + channel_id, tab, request, channel_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/aadi/.local/src/yt-local/youtube/channel.py", line 380, in get_channel_page_general_url
util.check_gevent_exceptions(*tasks)
File "/home/aadi/.local/src/yt-local/youtube/util.py", line 602, in check_gevent_exceptions
raise task.exception
File "src/gevent/greenlet.py", line 908, in gevent._gevent_cgreenlet.Greenlet.run
File "/home/aadi/.local/src/yt-local/youtube/channel.py", line 234, in get_channel_tab
content = util.fetch_url(
^^^^^^^^^^^^^^^
File "/home/aadi/.local/src/yt-local/youtube/util.py", line 359, in fetch_url
raise FetchError(str(response.status), reason=response.reason,
youtube.util.FetchError: HTTP error during request: 500 Internal Server Error
Going to any channel seems to load the first page of videos fine. Trying to go to any other page returns the following 500:
Also, the
Shorts
,Streams
, andPlaylists
pages seem to not work as well, returning no videos. Also, I tried doing the same with and without tor, still getting this issue.