Skip to content

Commit

Permalink
6.5.1 - Add Webkit Support
Browse files Browse the repository at this point in the history
  • Loading branch information
davidteather committed Aug 24, 2024
1 parent 077b2fc commit a53f60a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions TikTokApi/tiktok.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -35,7 +34,6 @@ async def test_user_videos():

assert count >= 30


@pytest.mark.asyncio
async def test_user_likes():
api = TikTokApi()
Expand Down

0 comments on commit a53f60a

Please sign in to comment.