Skip to content

Commit

Permalink
Make sure playerOffsetMs is positive in youtube_live_chat by siikamiika
Browse files Browse the repository at this point in the history
ytdl-org#5 (blackjack4494#262)

Authored by siikamiika
  • Loading branch information
pukkandan committed Jan 7, 2021
2 parents 3ad6c46 + ae6e4e2 commit 2c35345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dlc/downloader/youtube_live_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c35345

Please sign in to comment.