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

Data scraping unable to complete in 30.0s #80

Open
duytran1332002 opened this issue Nov 20, 2023 · 7 comments
Open

Data scraping unable to complete in 30.0s #80

duytran1332002 opened this issue Nov 20, 2023 · 7 comments
Labels
question Further information is requested

Comments

@duytran1332002
Copy link

My code:

import asyncio
from tiktokapipy.async_api import AsyncTikTokAPI

async def do_something():
    async with AsyncTikTokAPI() as api:
        video = await api.user("huydao")
        print(video)

asyncio.run(do_something())

but I have error:
image

Anyone can fix it?

@duytran1332002 duytran1332002 added the question Further information is requested label Nov 20, 2023
@Russell-Newton
Copy link
Owner

Please provide some more details such as where you're located and what version of the library you're using. There's a known issue with the user function that makes it not work in certain regions without a proxy.

@duytran1332002
Copy link
Author

Please provide some more details such as where you're located and what version of the library you're using. There's a known issue with the user function that makes it not work in certain regions without a proxy.

I am located in Viet Nam, I used the lasted version - 0.2.4. How I apply proxy to fix this problem?

@Russell-Newton
Copy link
Owner

Take a look at the documentation for the TikTokAPI class and for Playwright's Browser::launch() function. You can pass in browser launch args as kwargs for the TikTokAPI class. This includes proxy information.

@LoliHaxxer
Copy link

I tried TikTokApi and TikTokPy for scraping a user's videos, and both of them ended up in an issue that would allegedly be solved by using a proxy. Since both libraries are based on playwright, what is a proxy service that works well with playwright?
I own one dedicated socks proxy with auth, but playwright fails on socks proxies with auth.

@princewillingoo
Copy link

@LoliHaxxer Have you been able to figure out a proxy service that works well with playwright?

I tried TikTokApi and TikTokPy for scraping a user's videos, and both of them ended up in an issue that would allegedly be solved by using a proxy. Since both libraries are based on playwright, what is a proxy service that works well with playwright? I own one dedicated socks proxy with auth, but playwright fails on socks proxies with auth.

@LoliHaxxer
Copy link

No I haven't, I just proceeded to scrape myself with Selenium

@princewillingoo
Copy link

No I haven't, I just proceeded to scrape myself with Selenium
@LoliHaxxer
Do you mind sharing how you go about doing that? I keep getting a CAPTCHA on the first request. If you don't mind I can drop a medium to contact me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants