Skip to content

Commit aed4e8c

Browse files
authored
Merge pull request #1 from Martouta/browser-no-current-event-loop-using-threads
[Bugfix] RuntimeError: There is no current event loop in thread
2 parents 86ab7ca + 1579d5f commit aed4e8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TikTokAPI/tiktok_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, user_agent):
5151
self.tiktok_dummy_page = "file://" + os.path.join(parent_folder, "website", "tiktok.html")
5252

5353
def fetch_auth_params(self, url, language='en'):
54-
return asyncio.get_event_loop().run_until_complete(self.async_fetch_auth_params(url, language))
54+
return asyncio.new_event_loop().run_until_complete(self.async_fetch_auth_params(url, language))
5555

5656
async def async_fetch_auth_params(self, url, language):
5757
browser = await launch(self.options)

0 commit comments

Comments
 (0)