frederikme / TinderBotz

Automated Tinder bot and scraper using selenium in python.
MIT License
567 stars 146 forks source link

Should have a random sleep time to prevent tinder from detecting the bot? #11

Closed sgaurav510 closed 3 years ago

sgaurav510 commented 3 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

frederikme commented 3 years ago

Hi @sgaurav510 ,

The bot already has a sleep argument for between swipes implemented. To avoid being spotted by their botdetection a few things are crucial:

  1. don't send spammy looking messages as people will report your profile
  2. don't like every profile (80% or so should do)
  3. use the provided sleep argument to sleep between swipes
  4. add a randomised longer sleep between two large blocks of swiping

example code

while True:
    session.like(amount=50, ratio="72.5%", sleep=1.5)
    random_sleep = random.randint(60, 120)
    time.sleep(random_sleep)

If you have any question or remarks, please let me know. :) If not, please close this issue.

Thanks for contributing to Tinderbotz!

Have a nice day,

Fred

sgaurav510 commented 3 years ago

Okay thanks buddy. Actually i am tinder plus user and have unlimited swipes, what changes should i make to amount and random sleep because i want to run the bot whole night without getting ban . Any suggestions?

frederikme commented 3 years ago

I'm still looking into some options for making tinderbotz 100% bot detection proof, but for now the best thing to do is improving the sleeping between swipes. At night when you're not watching the script run, I would take 2 seconds of sleeping between every swipe to play it safe and a random 1 to 3 minutes between every 50 swipes or so. If that makes sense. If it doesn't, just let me know and I'd quickly write you a rather safe to use script to run at night. To avoid getting banned a few other things might be interesting:

  1. Link your Instagram and/or Spotify
  2. Try to get that verified tick (if it's supported in your region)

The goal is to make your account as different as possible in comparison to those 1 image, no bio, no instagram, spambots. Bot detection is basically done using 2 parameters.

  1. Profile (or rather how real and authentic your profile looks)
  2. Behaviour (in this case swipes and messages)

The former can be fairly easy improved by filling your profile with as much images as possible, writing a good bio, linking Instagram and/or Spotify, and getting verified. The latter is a bit tricky, because it's all bout risk management. Less sleeping and less disliking could result in more matches but also gives you a higher chance of getting banned. That's a choice that I can't really make for others.

sgaurav510 commented 3 years ago

[Running] python -u "c:\Users\sgaur\Downloads\TinderBotz-master\TinderBotz-master\auto_swipe.py"


    |_   _(_)_ __   __| | ___ _ __| |__   ___ | |_ ____
      | | | | '_ \ / _` |/ _ \ '__| '_ \ / _ \| __|_  /
      | | | | | | | (_| |  __/ |  | |_) | (_) | |_ / / 
      |_| |_|_| |_|\__,_|\___|_|  |_.__/ \___/ \__/___|
    ----------------------------------------------------

Made by Frederikme Started session: 2021-01-09 00:51:04

Adding Location Guard extension ... Getting ChromeDriver ...

[WDM] - Current google-chrome version is 87.0.4280 [WDM] - Get LATEST driver version for 87.0.4280 [WDM] - Driver [C:\Users\sgaur.wdm\drivers\chromedriver\win32\87.0.4280.88\chromedriver.exe] found in cache User is not logged in yet.

COOKIES ACCEPTED. COOKIES ACCEPTED. ACCEPTED LOCATION. DENIED NOTIFICATIONS.

[>-----------------------------] 0% of the likes handled. [======>-----------------------] 20% of the likes handled. [=========>--------------------] 30% of the likes handled. [============>-----------------] 40% of the likes handled. [===============>--------------] 50% of the likes handled. [==================>-----------] 60% of the likes handled. [=====================>--------] 70% of the likes handled. [========================>-----] 80% of the likes handled. [===========================>--] 90% of the likes handled. [==============================>] 100% of the likes handled.

[==============================>] 100% of the likes handled.

Traceback (most recent call last): File "c:\Users\sgaur\Downloads\TinderBotz-master\TinderBotz-master\auto_swipe.py", line 30, in random_sleep=random.randint(60, 120) /==============\ Tinderbotz
duration: 94
like: 10
dislike: 8
superlike: 0

\==============/ Started session: 2021-01-09 00:51:04 Ended session: 2021-01-09 00:52:39 NameError: name 'random' is not defined

any help?

sgaurav510 commented 3 years ago

Ohh I have fixed that error by simply adding import time and import random. but the issue now i am facing is the bot if it completes 100 likes it will stop whereas what i want is :- 1.)When the bot completes 100 likes it Should sleep for a random time between 5-10 mins and then again starts . 2.) There should be a random time game between 1 to 3 second between each swipe , for better use for night

can you do that because I literally don't know how to code. it would be very helpful

frederikme commented 3 years ago

Given your requirements, I think the code below should do the trick. :)

from tinderbotz.session import Session
import random, time

if __name__ == "__main__":
    # creates instance of session
    session = Session()

    # replace this with your email and password
    email = "example@gmail.com"
    password = "password123"

    # login using google
    session.loginUsingGoogle(email, password)

    # make sure the code keeps running
    while True:
        # like 100 times with each time a small sleep of 1-3 seconds
        for _ in range(100):
            session.like()
            small_sleep = random.uniform(1, 3)
            time.sleep(small_sleep)

        # after 100 likes, do 1 big sleep of 5-10 minutes
        large_sleep = random.randint(5*60, 10*60)
        time.sleep(large_sleep)
elusyx commented 2 years ago

Hey Frederik!

Thanks for this bit of code. I'm running into an issue. How would I add a swipe amount percentage to the posted code above?

Thanks!