Channel: use general pbj=1 endpoint to get first page of videos

YouTube disabled the browse_ajax endpoint. Quick fix for first
channel page. In general, this will be more robust against api
endpoint changes. As YouTube continues to change api endpoints,
at least the subscriptions and first page will no longer break.

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor
2021-03-02 17:08:20 -08:00
committed by Jesús
parent 2d9aca4b8b
commit f7ed8159cd
2 changed files with 15 additions and 4 deletions

View File

@@ -484,7 +484,7 @@ def _get_upstream_videos(channel_id):
tasks = (
# channel page, need for video duration
gevent.spawn(_get_channel_tab, channel_id, channel_status_name),
gevent.spawn(channel.get_channel_first_page, channel_id=channel_id),
# need atoma feed for exact published time
gevent.spawn(_get_atoma_feed, channel_id)
)