diff --git a/.sphinx/conf.py b/.sphinx/conf.py index 83391fe8..5a075972 100644 --- a/.sphinx/conf.py +++ b/.sphinx/conf.py @@ -16,7 +16,7 @@ project = "TikTokAPI" copyright = "2023, David Teather" author = "David Teather" -release = "v6.5.0" +release = "v6.5.1" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/main/usage/configuration.html#general-configuration diff --git a/CITATION.cff b/CITATION.cff index f9945c0f..2eaa778c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -5,5 +5,5 @@ authors: orcid: "https://orcid.org/0000-0002-9467-4676" title: "TikTokAPI" url: "https://github.com/davidteather/tiktok-api" -version: 6.5.0 +version: 6.5.1 date-released: 2024-08-24 diff --git a/TikTokApi/tiktok.py b/TikTokApi/tiktok.py index 50167eee..71450c85 100644 --- a/TikTokApi/tiktok.py +++ b/TikTokApi/tiktok.py @@ -91,6 +91,7 @@ def __create_logger(self, name: str, level: int = logging.DEBUG): async def __set_session_params(self, session: TikTokPlaywrightSession): """Set the session params for a TikTokPlaywrightSession""" + print(await session.page.evaluate('navigator.userAgent')) user_agent = await session.page.evaluate("() => navigator.userAgent") language = await session.page.evaluate( "() => navigator.language || navigator.userLanguage" @@ -254,6 +255,10 @@ async def create_sessions( self.browser = await self.playwright.firefox.launch( headless=headless, args=override_browser_args, proxy=random_choice(proxies), executable_path=executable_path ) + elif browser == "webkit": + self.browser = await self.playwright.webkit.launch( + headless=headless, args=override_browser_args, proxy=random_choice(proxies), executable_path=executable_path + ) else: raise ValueError("Invalid browser argument passed") diff --git a/setup.py b/setup.py index 8afb8155..87758562 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="TikTokApi", packages=setuptools.find_packages(), - version="6.5.0", + version="6.5.1", license="MIT", description="The Unofficial TikTok API Wrapper in Python 3.", author="David Teather", diff --git a/tests/test_user.py b/tests/test_user.py index 0a698279..d0f07373 100644 --- a/tests/test_user.py +++ b/tests/test_user.py @@ -21,7 +21,6 @@ async def test_user_info(): assert user.user_id == user_id assert user.sec_uid == sec_uid - @pytest.mark.asyncio async def test_user_videos(): api = TikTokApi() @@ -35,7 +34,6 @@ async def test_user_videos(): assert count >= 30 - @pytest.mark.asyncio async def test_user_likes(): api = TikTokApi()