Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] - How to use proxies to get anothor region TikToks? #1146

Open
AbubakrChan opened this issue May 4, 2024 · 4 comments
Open

[QUESTION] - How to use proxies to get anothor region TikToks? #1146

AbubakrChan opened this issue May 4, 2024 · 4 comments
Labels
installation_help Someone is having problems installing the api

Comments

@AbubakrChan
Copy link

Right now, I am able to fetch trending videos in my region only. I would like to be able to fetch anoyother region (like Japan) TikToks.

I was suggested to use proxies so I tried enabling VPN and it resulted into errors. If anyone can guide me on how I can successully set a proxy that would be great.

I also asked my colleagues from US to give me there mstoken so I can access TikTok from that region but that also didn't worked out.

I would be very thankfull for any kind of help.

Thanks

@AbubakrChan AbubakrChan added the installation_help Someone is having problems installing the api label May 4, 2024
@Gereks123
Copy link

When creating a session, have you tired passing a list of proxies? https://github.com/davidteather/TikTok-Api/blob/main/TikTokApi/tiktok.py#L203

@AbubakrChan
Copy link
Author

@Gereks123 - Thank you for your reply!
Yes I tried passing the list of proxies and it gave me "playwright timeout 30000ms exceeded" error.
Please share if you have a working solution for this.
Thanks.

@AbubakrChan
Copy link
Author

Or if you can share a sample code for the correct way to pass the proxy list, that would be great.
Thanks

@AbubakrChan
Copy link
Author

here is how I am passing the proxy:

await api.create_sessions(ms_tokens=[ms_token], num_sessions=1, sleep_after=3, context_options=context_options, proxies=['50.217.226.44:80'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation_help Someone is having problems installing the api
Projects
None yet
Development

No branches or pull requests

2 participants