{"id":16446540,"url":"https://github.com/edoardottt/twitterbot","last_synced_at":"2025-05-12T04:30:27.842Z","repository":{"id":109575504,"uuid":"195667482","full_name":"edoardottt/twitterBot","owner":"edoardottt","description":"[NOT WORKING] 🤖 CLI Twitter Bot. It's made to reach more engagement based on your interests. See https://github.com/edoardottt/twitterbot2","archived":false,"fork":false,"pushed_at":"2024-11-10T09:38:26.000Z","size":306,"stargazers_count":39,"open_issues_count":1,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T23:51:17.133Z","etag":null,"topics":["bot","bots","feed","keywords","pydev","python","python-script","python3","retweets","selenium","sql","sqlite3","sqlite3-database","tweet","tweets","tweets-reached","twitter","twitter-bot","twitterbot","webscraping"],"latest_commit_sha":null,"homepage":"https://edoardottt.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edoardottt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-07T15:29:03.000Z","updated_at":"2024-11-29T22:42:47.000Z","dependencies_parsed_at":"2023-04-27T06:01:30.261Z","dependency_job_id":null,"html_url":"https://github.com/edoardottt/twitterBot","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoardottt%2FtwitterBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoardottt%2FtwitterBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoardottt%2FtwitterBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoardottt%2FtwitterBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edoardottt","download_url":"https://codeload.github.com/edoardottt/twitterBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253675034,"owners_count":21945884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","bots","feed","keywords","pydev","python","python-script","python3","retweets","selenium","sql","sqlite3","sqlite3-database","tweet","tweets","tweets-reached","twitter","twitter-bot","twitterbot","webscraping"],"created_at":"2024-10-11T09:47:58.912Z","updated_at":"2025-05-12T04:30:27.832Z","avatar_url":"https://github.com/edoardottt.png","language":"Python","readme":"# twitterBot 🤖\r\n\r\n# VERSION 2 OUT NOW =\u003e [twitterbot2](https://github.com/edoardottt/twitterbot2)\r\n\r\n\r\n\r\n**⚠️CURRENTLY NOT WORKING DUE TO NEW TWITTER WEBSITE⚠️**\r\n\r\nFollow https://twitter.com/edoardottt2\r\n\r\nCLI Twitter Bot. It's made to reach more engagement based on your interests. \r\n\r\n![version](https://github.com/edoardottt/images/blob/main/twitterbot/version.svg)\r\n![python-version](https://github.com/edoardottt/images/blob/main/twitterbot/python-version.svg)\r\n![win-build-success-badge.svg](https://github.com/edoardottt/images/blob/main/twitterbot/win-build-success-badge.svg)\r\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/01b7f84f58384bad948b281f22f7b730)](https://www.codacy.com/manual/edoardottt/twitterBot?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=edoardottt/twitterBot\u0026amp;utm_campaign=Badge_Grade)\r\n\r\nDoes it really works? 📊\r\n----------\r\n**Take a look**\r\n\r\n![general analytics](https://github.com/edoardottt/images/blob/main/twitterbot/1.JPG)\r\n\r\n![followers analytics](https://github.com/edoardottt/images/blob/main/twitterbot/2.JPG)\r\n\r\n![my insights (from twitterBot)](https://user-images.githubusercontent.com/35783570/61305835-d4272880-a7eb-11e9-93ca-78f6d3a152e3.JPG)\r\n\r\nGet started 🎉\r\n--------\r\n\r\n- Download this repo and open a terminal inside the main folder\r\n\r\n- Install the required libraries: `pip install -r requirements.txt`\r\n\r\n- ONLY FOR LINUX\r\n\r\n    - [Download the latest release of geckodriver](https://github.com/mozilla/geckodriver/releases)\r\n      \r\n    - Execute this ```export PATH=$PATH:/path/to/directory/of/executable/downloaded/in/previous/step```\r\n\r\n- To start the bot searching for some keywords:\r\n\r\n   ```python twitterbot.py -u YOUR-EMAIL@mail.com -k trend,topics,twitter```\r\n \r\n- To start the bot with your feed:\r\n\r\n   ```python twitterbot.py -u YOUR-EMAIL@mail.com -m```\r\n \r\n- To see your account bot statistics with a chart:\r\n\r\n   ```python twitterbot.py -u YOUR-EMAIL@mail.com -s```\r\n\r\n- To see info:\r\n\r\n   ```python twitterbot.py -i```\r\n        \r\n- Help doc.:\r\n\r\n   ```python twitterbot.py -h```   \r\n\r\n- Follow the followers of an user:\r\n        \r\n   ```python twitterbot.py -u YOUR-EMAIL@mail.com -f edoardottt2```\r\n\r\nDescription 🔦 \r\n--------\r\n\r\nIt uses selenium, matplotlib, getpass and other famous python libraries.\r\n\r\nIt tries to login with an email and a password on Twitter. \r\nIf credentials are correct, It looks into the database if that user logged in yet and so if There is a record with that username id.\r\nIf there isn't that record, It creates it.\r\nIf the credentials aren't correct, throws an error.\r\n\r\nIt captures the followers count in your Home.\r\nYou can decide if It searches for some keywords as input and It will looks for some tweets searching those words in the search input field.\r\nInstead you can crawl the tweets present in your Home Feed.\r\n\r\nThe tweets links listed in the result pages are copied in a unique list X.\r\nThe elements of this X list are shuffled and then It starts to search those tweets.\r\nSurely It presses the heart button on all of those, then It maybe retweets them.\r\n\r\nWhy maybe?\r\n\r\nBecause It only retweets the ~50% of all tweets reached (but puts likes on all).\r\n\r\nWhy ~50% and not exactly 50%?\r\n\r\nBecause for little numbers, less trendingand low content keywords and few tweets in your feed (so the captured links \u003c 30-40) It retweets about 40-65% of all tweets reached.\r\n\r\nInstead for big numbers, most trending, with high content keywords and so if your feed contains so many tweets (so the captured links \u003e 80-90) It's more precise and almost exactly retweets 50% of them (with a low error like 3-4%).\r\n\r\nWhen It finish, It stores all the likes and retweets count in a SQLite3 database called database.db\r\n\r\nWith the -s option (only if the password matches the word stored in the database on the same record of that username) It displays (with the help of matplotlib) a chart that shows the amount of likes, retweets and followers per day.\r\n\r\nRequirements 📣\r\n---------\r\n\r\n- Mozilla Firefox\r\n- Python \u003e= 3.0\r\n- selenium (`pip install selenium`) OR [geckodriver](https://github.com/mozilla/geckodriver/releases)\r\n- matplotlib (`python -m pip install -U matplotlib`)\r\n- It works only with desktop-type Twitter website window\r\n\r\nUsage 🚀\r\n-------\r\n\r\nAssuming you are in the same folder of the scripts and you run them with **python3**:\r\n\r\nUsage: python twitterbot.py -u [value] {-k [values separated by comma] OR -s OR -m} OR -i OR -h\r\n\r\n-u or --username: \r\n\r\n        It's your twitter username(e-mail)\r\n\r\n-k or --keywords:\r\n\r\n        It's/They are the keyword[s] you want to crawl\r\n\r\n        If you want to insert multiple keywords you have to separated them by comma:\r\n\r\n        e.g. -k climatechange,techtips,python\r\n\r\n-s or --stat:\r\n\r\n        If you want to see your stats account with a chart.\r\n\r\n        Insert only -u [value] -s\r\n\r\n-m or --mine:\r\n\r\n        If you want to crawl your feed's tweets.\r\n\r\n        Insert only -u [value] -m\r\n\r\n-i or --info:\r\n\r\n        To see twitterBot info.\r\n        \r\n        Insert only -i\r\n        \r\n-h or --help:\r\n\r\n        Help documentation\r\n        \r\n        Insert only -h\r\n        \r\n-f or --follow:\r\n\r\n        Insert an username. The bot will check for some\r\n        followers of that username and it tries to follow them.\r\n\r\n        Insert -f username\r\n\r\nDownload 📡\r\n---------\r\n\r\n`git clone https://github.com/edoardottt/twitterBot.git`\r\n\r\nContributing\r\n--------\r\n\r\nJust open an [issue](https://github.com/edoardottt/twitterBot/issues) / [pull request](https://github.com/edoardottt/twitterBot/pulls).\r\n\r\n\r\nVersioning 📊\r\n---------\r\n\r\n**[v1.3.3.3](https://github.com/edoardottt/twitterBot/releases/tag/v1.3.3.3):**\r\n\r\n        ADDED:\r\n                - Security bugs fixed\r\n                \r\n**[v1.3.3.2](https://github.com/edoardottt/twitterBot/releases/tag/v1.3.3.2):**\r\n\r\n        ADDED:\r\n                - f option. Follow random accounts\r\n\r\n**[v1.3.3.1](https://github.com/edoardottt/twitterBot/releases/tag/v1.3.3.1):**\r\n\r\n        ADDED:\r\n                - Refactoring\r\n                - Added dynamical prints\r\n                - Set the plot title\r\n                - Fixed some knows bugs (limit print, typing errors)\r\n\r\n**[v1.3.3](https://github.com/edoardottt/twitterBot/releases/tag/v1.3.3):**\r\n\r\n        ADDED:\r\n\r\n                - Added -i or --info option that calls print_usage(7) = version, github site, License.\r\n                - Added -h or --help option that calls print_usage(0)\r\n                - Added twitterBot_log.txt file function that catches the exceptions \r\n                  and write them into it. \r\n                - If isn't present any option after -u calls print_usage(8) = Error 8: Bad input\r\n                - Check if the internet connection status is active, otherwise print_usage(6) = \r\n                  Error 6: no internet connection\r\n\r\n        CHANGED:\r\n\r\n                - -h or --hashtags changed in -k or --keywords\r\n\r\n        REMOVED:\r\n\r\n                - Print the website URL on print_usage(0)\r\n\r\n**[v1.3.2](https://github.com/edoardottt/twitterBot/releases/tag/v1.3.2):**\r\n\r\n        - Crawling updates (time, likes and retweets) print on the same line and then flush it\r\n        - Added followers update that appears on the chart\r\n        - Added point marker on the chart\r\n        \r\n**v 1.3.1:**\r\n\r\n        - Password input not readable\r\n        - Statistics aggregated per days\r\n        - Bad input handled. All error prints migrated on print_usage(error_code)\r\n        - When it's crawling, doesn't print milliseconds\r\n\r\n**v 1.3:**\r\n\r\n        - Added a better visualization of statistics for every user with matplotlib\r\n        - With -s option now It shows a chart that shows likes and retweets for each performance performed\r\n\r\n**v 1.2.1:**\r\n\r\n        - Now It prints the links crawled in your home/search input field  \r\n\r\n**v 1.2:**\r\n\r\n        - Added some files that create an SQLite3 database and stores users and bot sessions\r\n      \r\n            table Users\r\n            It contains all the users authenticated by twitter\r\n            \r\n            table analytics\r\n            It contains all the likes and retweets count of all bot sessions\r\n            \r\n        - Fixed some known bugs (invalid credentials, bad usage..)\r\n        - More readable usage printer\r\n\r\n**v1.1:**\r\n\r\n        - Catching some known Exceptions\r\n      \r\n**v1.0:**\r\n\r\n        - First release\r\n\r\nLicense 📝\r\n-------\r\n\r\nThis repository is under [MIT License](https://github.com/edoardottt/twitterBot/blob/master/LICENSE).  \r\n[edoardottt.com](https://edoardottt.com/) to contact me.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedoardottt%2Ftwitterbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedoardottt%2Ftwitterbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedoardottt%2Ftwitterbot/lists"}