Coder Social home page Coder Social logo

alejandroms1912 / twitterbot-without-api Goto Github PK

View Code? Open in Web Editor NEW
28.0 3.0 4.0 6.8 MB

A few of scripts that use an inputed hashtag or username as an index to execute the ordered action (Follow, unfollow, like or retweet) using random and customizable time intervals to avoid the Twitter's ban systems. It works just with a chrome driver and his python library Selenium-python. Without API/Tweepy

License: GNU General Public License v3.0

Python 100.00%
chromedriver follow-back follow-bot followers-boost followers-twitter like-bot like-tweets python-scripts retweet-bot retweet-tweets selenium-python twitter twitter-api twitter-bot unfollow-bot unfollow-script visual-studio-code

twitterbot-without-api's Introduction

TwitterBot without API

A few of scripts that use an inputed hashtag or username as an index to execute the ordered action (Follow, unfollow, like or retweet) using random and customizable time intervals to avoid the Twitter's ban systems.

It works just with a chrome driver and his python library Selenium-python.

Without API/Tweepy

What do you need to start using the TwitterBot?

- Twitter account

Create a new account or use your own

pip install selenium
pip install python-time
pip install random2
  • Check your Chrome version
First step Second step
  • CLICK HERE and download the Chromedriver with the corresponding version
First step Second step

When you have already installed the chromedriver.exe copy it to the TwitterBot scripts folder in Visual Studio Code and you can start running it

Warning REMEMBER THAT YOU HAVE TO SPECIFY THE PATH OF THE chromedriver.exe IN EACH OF THE SCRIPTS

How do it works?

This repository is divided into 4 folders (FollowScripts, UnfollowScript, LikeScripts and RetweetScripts) but the idea of all of them is the same, execute their action according to their input parameters.

We can introduce a username (ex. 'elonmusk') so that the bot goes directly to his profile and starts executing the action (Follow his followers or like and retweet his tweets) or we can also introduce a hashtag/keyword (ex. 'drop handles') as an index to execute the action (Like and retweet the tweets founded in that hashtag or start following the followers of each of the users who have tweeted that hashtag/keyword)

Note Obiusly the UnfollowScript only can use as input your own username

Here you have 4 YT videos to exemplify the operation of each script:

How to avoid Twitter bans?

Follows and unfollows limits:

According to the Twitter privacy policy, the number of accounts you can follow is not limitited in fact, but there are some conditions about the pace as wich you can do so:

  • The maximum number of accounts you can follow in a day is 400. Verified Twitter accounts are able to follow up to 1,000 accounts per day.
  • You can only follow 5000 accounts. Once you reach that number, you may need to wait until your account has more followers before you can follow additional accounts.
  • You should not spam constantly follows or unfollows. The number of follows/unfollows that you can do continuosly is limited and it is recommended make an step of a few seconds between each follow/unfollow. The cooldowns that are usually been used are series of 20/30 follows with a break of 10 minutes each one of them and a interval of 3/15 seconds between each follow/unfollow.

Tweet/Retweet limits:

  • According to the Twitter privacy policy, the maximum number of tweets you can post in a day is 2400. The daily update limit is subdivided into smaller limits with half-hour intervals. Retweets are counted as Tweets.

Liking limits:

It seems that there is not any limit for liking tweets

Note This bot uses random intervals of time each follow with the goal of appearing as natural as possible against Twitter's ban systems. You can modify all of these intervals to fit your needs.

Conclusion

In resume, this bot uses an inputed hashtag or username as an index to execute the ordered action (Follow, unfollow, like or retweet) using random and customizable time intervals to avoid the Twitter's ban systems. This is very useful because you can get interactions back from your target keyword.

The fact of not using the Twitter API makes the bot's actions much more difficult to detect for the application's tracking systems.

Future Projects

This is just a tiny sample of what could be achieved by following this working method. In this repository I have shown how to develop the basic functions of Twitter as a starting point but there is a universe of possibilities beyond this.

  • If you have a custom phone cases shop, for example, I could make a script that replies with a custom text (even with a link to your shop) to every person who has ever tweeted "phone case". Or interact with each tweet published by the main mobile phone brands. Or block anyone who interacts with you with the "she/her he/him" in their bio... the possibilities are endless
  • I could also do something similar on any other social network like Instagram, Facebook, Reddit, TikTok... (with a few of time to understand its html structure)

If you are interested in something like this, I'm here to help with whatever is needed

twitterbot-without-api's People

Contributors

alejandroms1912 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

twitterbot-without-api's Issues

Need help testing.

Hello,

Thanks for making this.
I am trying to get this running on my end but encountered a couple issues.

Where I try to run "pip install random" I get this:

ERROR: Could not find a version that satisfies the requirement random (from versions: none) ERROR: No matching distribution found for random WARNING: You are using pip version 20.2.3; however, version 22.3.1 is available. You should consider upgrading via the 'c:\python38\python.exe -m pip install --upgrade pip' command.

And then when I try to run "Like.py" I get this:

`C:\Users\William Salas\Downloads_APPZ\TwitterBot-without-API-main>Like.py
Select your index (hashtag or username): hashtag
Type the hashtag: test
C:\Users\William Salas\Downloads_APPZ\TwitterBot-without-API-main\Like.py:32: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
self.bot = webdriver.Chrome(executable_path='C:/Users/William Salas/Downloads/_APPZ/TwitterBot-without-API-main/chromedriver.exe') # Copy YOUR chromedriver path

DevTools listening on ws://127.0.0.1:54621/devtools/browser/93f4c6d1-ee58-4368-8ada-ef5ae6635cf9
[3932:27840:1118/121104.937:ERROR:device_event_log_impl.cc(215)] [12:11:04.938] USB: usb_service_win.cc:415 Could not read device interface GUIDs: The system cannot find the file specified. (0x2)
Traceback (most recent call last):
File "C:\Users\William Salas\Downloads_APPZ\TwitterBot-without-API-main\Like.py", line 129, in
UserParameters.where_to_like(inputVariable, user, hashtag)
File "C:\Users\William Salas\Downloads_APPZ\TwitterBot-without-API-main\Like.py", line 116, in where_to_like
RejectCookies = bot.find_element("xpath", '//[@id="layers"]/div/div/div/div/div/div[2]/div[2]/div/span/span')
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1244, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//
[@id="layers"]/div/div/div/div/div/div[2]/div[2]/div/span/span"}
(Session info: chrome=107.0.5304.107)
Stacktrace:
Backtrace:
Ordinal0 [0x00541ED3+2236115]
Ordinal0 [0x004D92F1+1807089]
Ordinal0 [0x003E66FD+812797]
Ordinal0 [0x004155DF+1005023]
Ordinal0 [0x004157CB+1005515]
Ordinal0 [0x00447632+1209906]
Ordinal0 [0x00431AD4+1120980]
Ordinal0 [0x004459E2+1202658]
Ordinal0 [0x004318A6+1120422]
Ordinal0 [0x0040A73D+960317]
Ordinal0 [0x0040B71F+964383]
GetHandleVerifier [0x007EE7E2+2743074]
GetHandleVerifier [0x007E08D4+2685972]
GetHandleVerifier [0x005D2BAA+532202]
GetHandleVerifier [0x005D1990+527568]
Ordinal0 [0x004E080C+1837068]
Ordinal0 [0x004E4CD8+1854680]
Ordinal0 [0x004E4DC5+1854917]
Ordinal0 [0x004EED64+1895780]
BaseThreadInitThunk [0x76C4FEF9+25]
RtlGetAppContainerNamedObjectPath [0x77867BBE+286]
RtlGetAppContainerNamedObjectPath [0x77867B8E+238]

C:\Users\William Salas\Downloads_APPZ\TwitterBot-without-API-main>`

Do you know what I might be doing wrong?

Thanks!

Bot not working anymore.

Hi,

I haven't used this in months and tried earlier today, but I forget what it said. So I came here and found you updated everything recently, so I downloaded all the latest and greatest files, but now it works up until it logs me into twitter, then nothing happens.

Do you know what might be wrong with this?

C:\Users\William Salas>cd "C:\Users\William Salas\Downloads_APPZ\Twitter\TwitterBot-without-API-main"

C:\Users\William Salas\Downloads_APPZ\Twitter\TwitterBot-without-API-main>"C:\Users\William Salas\Downloads_APPZ\Twitter\TwitterBot-without-API-main\Like.py"
Select your index (hashtag or username): hashtag
Type the hashtag: c4d
C:\Users\William Salas\Downloads_APPZ\Twitter\TwitterBot-without-API-main\Like.py:33: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
self.bot = webdriver.Chrome(executable_path='C:/Users/William Salas/Downloads/_APPZ/Twitter/TwitterBot-without-API-main/chromedriver.exe') # Copy YOUR chromedriver path

DevTools listening on ws://127.0.0.1:60457/devtools/browser/c97dea42-9ba9-40dc-9ae4-5dffb4e7cf79
[14756:31012:0126/115729.983:ERROR:device_event_log_impl.cc(215)] [11:57:29.983] USB: usb_service_win.cc:415 Could not read device interface GUIDs: The system cannot find the file specified. (0x2)
Traceback (most recent call last):
File "C:\Users\William Salas\Downloads_APPZ\Twitter\TwitterBot-without-API-main\Like.py", line 142, in
UserParameters.where_to_like()
TypeError: where_to_like() missing 3 required positional arguments: 'inputVariable', 'user', and 'hashtag'

C:\Users\William Salas\Downloads_APPZ\Twitter\TwitterBot-without-API-main>

retweet not working

Alejandro, this is impressive, a great peace of code. But I realize retweet is not working anymore, maybe because now it is called repost. I tried repost and not working neither.

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.