Russell-Newton / TikTokPy

Extract data from TikTok without needing any login information or API keys.
https://pypi.org/project/tiktokapipy/
MIT License
213 stars 28 forks source link

new feature: help add proxy #11

Closed Tianqi-Dotes closed 1 year ago

Tianqi-Dotes commented 1 year ago

hi, due to region limitations, some ppl have to visit tiktok with a network proxy, could you help add proxy while navigating tiktok thanx

Russell-Newton commented 1 year ago

Implemented in v0.1.8 by specifying launch options in kwargs of TikTokAPI or the AsyncTikTokAPI.

Full details of the launch options can be found in Playwright's Documentation.

Example for using a proxy:

from tiktokapiypy.api import TikTokAPI

with TikTokAPI(proxy={
  "server": "http://myproxy.com:3128",
  "username": "usr",
  "password": "pwd"
}) as api:
    ...
Tianqi-Dotes commented 1 year ago

Implemented in v0.1.8 by specifying launch options in kwargs of TikTokAPI or the AsyncTikTokAPI.

Full details of the launch options can be found in Playwright's Documentation.

Example for using a proxy:

from tiktokapiypy.api import TikTokAPI

with TikTokAPI(proxy={
  "server": "http://myproxy.com:3128",
  "username": "usr",
  "password": "pwd"
}) as api:
    ...

hi Russell, thanx for the help, this is helpful.

Russell-Newton commented 1 year ago

Related to #29 - Proxy setup should be working now as of 0.1.11.

zakrian07 commented 1 year ago

hey this is not working waiting until "load"