Git Product home page Git Product logo

Comments (3)

zhivko0 avatar zhivko0 commented on July 28, 2024

Hi, no its not only on your side, after some testing it seems that when the bot open the browser session it is getting stopped by captcha. You can see this if you set to "false" headless option in settings.toml file. I'm trying to work it out but nothing for now.

from tiktokpy.

JarroLightF avatar JarroLightF commented on July 28, 2024

I've been using this for my degree thesis and for now this is working for me 1/3 of the times.

I wrote that inside the Trending class inside trending.py.
It's spaghetti code and I have a week left for my thesis sorry I can't explain much further but this should work like twice a day, I think after that they ask you to insert captcha anyway (But still it resets daily, or maybe when the IP changes). Also I tried with QR code login but it freezes aand won't go any further.

You have to insert your login email where I put YOUR EMAIL and your password in YOUR PASSWORD. sorry for the spaghet

    await self.client.screenshot("trending.png", page)
    await page.click('button[type="button"]')
    await self.client.screenshot("trending.png", page)
    scroll_command = "document.querySelector('{selector}').scrollIntoView();"
    await page.locator('text=Use phone / email / username').click();
    await self.client.screenshot("trending.png", page)
    await page.click('a[href="/login/phone-or-email/email"]')
    await self.client.screenshot("trending.png", page)
    await page.type("input[class='tiktok-11to27l-InputContainer etcs7ny1']","YOUR EMAIL")
    await self.client.screenshot("trending.png", page)
    await page.type("input[class='tiktok-wv3bkt-InputContainer etcs7ny1']","YOUR PASSWORD")
    await self.client.screenshot("trending.png", page)
    await page.click('button[class="e1w6iovg0 tiktok-cjigsp-Button-StyledButton ehk74z00"]')
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    input("GO")

from tiktokpy.

Leeiiiiiii avatar Leeiiiiiii commented on July 28, 2024

I've been using this for my degree thesis and for now this is working for me 1/3 of the times.

I wrote that inside the Trending class inside trending.py. It's spaghetti code and I have a week left for my thesis sorry I can't explain much further but this should work like twice a day, I think after that they ask you to insert captcha anyway (But still it resets daily, or maybe when the IP changes). Also I tried with QR code login but it freezes aand won't go any further.

You have to insert your login email where I put YOUR EMAIL and your password in YOUR PASSWORD. sorry for the spaghet

    await self.client.screenshot("trending.png", page)
    await page.click('button[type="button"]')
    await self.client.screenshot("trending.png", page)
    scroll_command = "document.querySelector('{selector}').scrollIntoView();"
    await page.locator('text=Use phone / email / username').click();
    await self.client.screenshot("trending.png", page)
    await page.click('a[href="/login/phone-or-email/email"]')
    await self.client.screenshot("trending.png", page)
    await page.type("input[class='tiktok-11to27l-InputContainer etcs7ny1']","YOUR EMAIL")
    await self.client.screenshot("trending.png", page)
    await page.type("input[class='tiktok-wv3bkt-InputContainer etcs7ny1']","YOUR PASSWORD")
    await self.client.screenshot("trending.png", page)
    await page.click('button[class="e1w6iovg0 tiktok-cjigsp-Button-StyledButton ehk74z00"]')
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    time.sleep(5)
    await self.client.screenshot("trending.png", page)
    input("GO")

hello! where can I

Hi, no its not only on your side, after some testing it seems that when the bot open the browser session it is getting stopped by captcha. You can see this if you set to "false" headless option in settings.toml file. I'm trying to work it out but nothing for now.

any update to this?

from tiktokpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.