Skip to content

Commit

Permalink
Fix assignment of room id to params
Browse files Browse the repository at this point in the history
  • Loading branch information
isaackogan committed Oct 1, 2024
1 parent 251f257 commit 09336d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TikTokLive/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ async def start(
# <Required> Fetch room ID
try:
self._room_id: int = room_id or await self._web.fetch_room_id_from_html(self._unique_id)
self._web.params["room_id"] = str(self._room_id) or None
except Exception as base_ex:

if isinstance(base_ex, UserOfflineError) or isinstance(base_ex, UserNotFoundError):
Expand All @@ -130,6 +129,9 @@ async def start(
except Exception as super_ex:
raise super_ex from base_ex

# Gram Room ID
self._web.params["room_id"] = str(self._room_id) or None

# <Optional> Fetch live status
if fetch_live_check and not await self._web.fetch_is_live(room_id=self._room_id):
raise UserOfflineError()
Expand Down

0 comments on commit 09336d2

Please sign in to comment.