sudoguy / tiktokpy

Tool for automated TikTok interactions
MIT License
711 stars 146 forks source link

Following users #294

Open TeoVibe opened 1 year ago

TeoVibe commented 1 year ago

Hi!

Thank you for your effort on this project, it seems amazing!

Can anybody confirm that this is working on their end? I ran the quicklogin, logged in then the driver closed and I got a RuntimeError('Event loop is closed') in the terminal.

Afterwards with the quickstart.py it seems to pull the trending posts and in the terminal it shows its following users but that does not seem to be actually happening. I believe it authenticated fine so I am not certain the previous error is relevant, when I ran the same script without logging in it returned a different terminal output.

I'll also dive into this but I'd like to confirm the issue isn't something with my local configuration. Thanks in advance!

zhivko0 commented 1 year ago

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.

JarroLightF commented 1 year ago

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")
Leeiiiiiii commented 1 year ago

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?