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

fix: tiktok returned invalid reponse caused by bot detection #1197

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arhen
Copy link

@arhen arhen commented Sep 24, 2024

This PR to solve the issues #1187 #1193 #1179 by simulating user movement using scrolling after open the page.

@anarchopythonista
Copy link

anarchopythonista commented Oct 18, 2024

Some thoughts:

Could we get away from time.sleep with something like this:

await page.wait_for_load_state("networkidle")

I don't know playwright well enough to know if this would work. Currently, I'm working on getting an environment up to reproduce.

I also think

page.mouse.move(0, 0)
page.mouse.move(0, 100)

would make it fairly easy for TikTok to distinguish scrapers from legitimate desktop users. What are your thoughts on importing random and doing something like this:

x, y = 0, random.randint(0, 50)
a, b = random.randint(1, 50), random.randint(100, 200)

page.mouse.move(x, y)
page.mouse.move(a, b)

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

Successfully merging this pull request may close these issues.

3 participants