1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

Make sure playerOffsetMs is positive in youtube_live_chat by siikamiika #5 (blackjack4494#262)

Authored by siikamiika
This commit is contained in:
pukkandan 2021-01-07 20:36:47 +05:30 committed by pukkandan
commit 2c35345868

View File

@ -61,7 +61,7 @@ def parse_yt_initial_data(data):
else:
url = ('https://www.youtube.com/live_chat_replay/get_live_chat_replay'
+ '?continuation={}'.format(continuation_id)
+ '&playerOffsetMs={}'.format(offset - 5000)
+ '&playerOffsetMs={}'.format(max(offset - 5000, 0))
+ '&hidden=false'
+ '&pbj=1')
success, raw_fragment = dl_fragment(url)