Fix parameters for live

This commit is contained in:
taizan-hokouto
2021-02-11 01:56:32 +09:00
parent af4c2fe4b9
commit f46845c777
4 changed files with 32 additions and 12 deletions

View File

@@ -148,7 +148,10 @@ class LiveChat:
create and start _listen loop.
"""
if not self.continuation:
self.continuation = liveparam.getparam(self._video_id, 3)
self.continuation = liveparam.getparam(
self._video_id,
channel_id=util.get_channelid(httpx.Client(http2=True), self._video_id),
past_sec=3)
self._listen(self.continuation)
def _listen(self, continuation):
@@ -207,7 +210,9 @@ class LiveChat:
self._pauser.put_nowait(None)
if not self._is_replay:
continuation = liveparam.getparam(
self._video_id, 3, self._topchat_only)
self._video_id, channel_id=util.get_channelid(httpx.Client(http2=True), self._video_id),
past_sec=3, topchat_only=self._topchat_only)
return continuation
def _get_contents(self, continuation, client, headers):