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

Authored by siikamiika
pull/6/head^2
pukkandan 4 years ago committed by pukkandan
commit 2c35345868

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

Loading…
Cancel
Save