{"id":13567315,"url":"https://github.com/toadlyBroodle/spam-bot-3000","last_synced_at":"2025-04-04T01:31:44.257Z","repository":{"id":51251213,"uuid":"84254478","full_name":"toadlyBroodle/spam-bot-3000","owner":"toadlyBroodle","description":"Social media research and promotion, semi-autonomous CLI bot","archived":false,"fork":false,"pushed_at":"2019-04-18T19:14:32.000Z","size":6298,"stargazers_count":137,"open_issues_count":0,"forks_count":26,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-04T22:36:48.602Z","etag":null,"topics":["automation","bot","cli","command-line-tool","facebook","firefox","geckodriver","hashtag","instagram","keyword","marketing","promotion","python","reddit","research","scrape-dumps","scraper","selenium","social-media","twitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toadlyBroodle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-07T22:56:37.000Z","updated_at":"2024-10-28T18:13:51.000Z","dependencies_parsed_at":"2022-09-23T19:32:19.898Z","dependency_job_id":null,"html_url":"https://github.com/toadlyBroodle/spam-bot-3000","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadlyBroodle%2Fspam-bot-3000","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadlyBroodle%2Fspam-bot-3000/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadlyBroodle%2Fspam-bot-3000/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadlyBroodle%2Fspam-bot-3000/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toadlyBroodle","download_url":"https://codeload.github.com/toadlyBroodle/spam-bot-3000/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107816,"owners_count":20884793,"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":["automation","bot","cli","command-line-tool","facebook","firefox","geckodriver","hashtag","instagram","keyword","marketing","promotion","python","reddit","research","scrape-dumps","scraper","selenium","social-media","twitter"],"created_at":"2024-08-01T13:02:28.245Z","updated_at":"2025-04-04T01:31:39.236Z","avatar_url":"https://github.com/toadlyBroodle.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# spam-bot-3000\nA python command-line (CLI) bot for automating research and promotion on popular social media platforms (reddit, twitter, facebook, [TODO: instagram]). With a single command, scrape social media sites using custom queries and/or promote to all relevant results.\n\n\u003cb\u003ePlease use with discretion:\u003c/b\u003e i.e. choose your input arguments wisely, otherwise your bot could find itself, along with any associated accounts, banned from platforms very quickly. The bot has some built in anti-spam filter avoidance features to help you remain undetected; however, no amount of avoidance can hide blatantly abusive use of this tool.\n\n## features\n- reddit\n\t- scrape subreddit(s) for lists of keyword, dump results in local file (red_scrape_dump.txt)\n\t\t- separate keyword lists for AND, OR, NOT search operations (red_subkey_pairs.json)\n\t\t- search new, hot, or rising categories\n\t- reply to posts in red_scrape_dump.txt with random promotion from red_promos.txt\n\t\t- ignore posts by marking them in dump file with \"-\" prefix\n\t- praw.errors.HTTPException handling\n\t- write all activity to log (log.txt)\n- twitter\n\t- maintain separate jobs for different promotion projects\n\t- update user status\n\t- unfollow users who don't reciprocate your follow\n\t- scan twitter for list of custom queries, dump results in local file (twit_scrape_dump.txt)\n\t\t- scan continuously or in overwatch mode\n\t- optional bypassing of proprietary twitter APIs and their inherent limitations\n\t- promotion abilities\n        - tweepy api\n\t\t    - follow original posters\n\t\t    - favorite relevant tweets\n\t\t    - direct message relevant tweets\n\t\t    - reply to relevant tweets with random promotional tweet from file (twit_promos.txt)\n        - Selenium GUI browser\n            - favorite, follow, reply to scraped results while bypassing API limits\t    \n        - ignore tweets by marking them in dump file with \"-\" prefix\n\t- script for new keyword, hashtag research by gleening scraped results\n\t- script for filtering out irrelevant keywords, hashtags, screen names\n\t- script for automating scraping, filtering, and spamming only most relevant results\n\t- relatively graceful exception handling\n\t- write all activity to log (log.txt)\n- facebook\n\t- zero reliance on proprietary facebook APIs and their inherent limitations\n\t- Selenium GUI browser agent\n\t- scrape public and private user profiles for keywords using AND, OR, NOT operators\n\t\t- note: access to private data requires login to authorized account with associated access\n\t- scrape public and private group feeds for keywords using AND, OR, NOT operators\n\n## dependencies\n- install dependencies you probably don't have already, errors will show up if you're missing any others\n\t- install pip3 `sudo apt install python3-pip`\n\t- install dependencies `pip3 install --user tweepy bs4 praw selenium`\n\n## reddit initial setup\n- \u003ca href=\"https://praw.readthedocs.io/en/v4.0.0/getting_started/configuration/prawini.html\"\u003eupdate 'praw.ini'\u003c/a\u003e with \u003ca href=\"https://www.reddit.com/prefs/apps/\"\u003eyour reddit app credentials\u003c/a\u003e\n\t- \u003ca href=\"http://pythonforengineers.com/build-a-reddit-bot-part-1/\"\u003ehow to register a new reddit app\u003c/a\u003e\n- replace example promotions (red_promos.txt) with your own\n- replace example subreddits and keywords (red_subkey_pairs.json) with your own\n\t- you'll have to follow the existing json format\n\t- `keywords_and`: all keywords in this list must be present for positive matching result\n\t- `keywords_or`: at least one keyword in this list must be present for positive match\n\t- `keywords_not`: none of these keywords can be present in a positive match\n\t- any of the three lists may be omitted by leaving it empty - e.g. `\"keywords_not\": []`\n\n\u003cpraw.ini\u003e\n```\n...\n\n[bot1]\nclient_id=Y4PJOclpDQy3xZ\nclient_secret=UkGLTe6oqsMk5nHCJTHLrwgvHpr\npassword=pni9ubeht4wd50gk\nusername=fakebot1\nuser_agent=fakebot 0.1\n```\n\n\u003cred_subkey_pairs.json\u003e\n```\n{\"sub_key_pairs\": [\n{\n  \"subreddits\": \"androidapps\",\n  \"keywords_and\": [\"list\", \"?\"],\n  \"keywords_or\": [\"todo\", \"app\", \"android\"],\n  \"keywords_not\": [\"playlist\", \"listen\"]\n}\n]}\n```\n\n## reddit usage\n```\nusage: spam-bot-3000.py reddit [-h] [-s N] [-n | -H | -r] [-p]\n\noptional arguments:\n  -h,\t--help\t\tshow this help message and exit\n  -s N,\t--scrape N\tscrape subreddits in subreddits.txt for keywords in red_keywords.txt; N = number of posts to scrape\n  -n,\t--new\t\tscrape new posts\n  -H,\t--hot\t\tscrape hot posts\n  -r,\t--rising\tscrape rising posts\n  -p,\t--promote\tpromote to posts in red_scrape_dump.txt not marked with a \"-\" prefix\n```\n\n## twitter initial setup\n- create new directory to store new job data in (e.g. studfinder_example/)\n- create new 'credentials.txt' file in job directory to store your twitter app's credentials\n\t- \u003ca href=\"https://www.digitalocean.com/community/tutorials/how-to-create-a-twitterbot-with-python-3-and-the-tweepy-library\"\u003ea good guide for how to get twitter credentials\u003c/a\u003e\n\n\u003ccredentials.txt\u003e\n```\nyour_consumer_key\nyour_consumer_secret\nyour_access_token\nyour_access_token_secret\nyour_twitter_username\nyour_twitter_password\n```\n\n- create new 'twit_promos.txt' in job directory to store your job's promotions to spam\n\t- individual tweets on seperate lines\n\t- each line must by \u003c= 140 characters long\n- create new 'twit_queries.txt' in job directory to store your job's queries to scrape twitter for\n\t- individual queries on seperate lines\n\t- \u003ca href=\"https://dev.twitter.com/rest/public/search\"\u003eguide to constructing twitter queries\u003c/a\u003e\n- create new 'twit_scrape_dump.txt' file to store your job's returned scrape results\n\n## twitter usage\n```\nusage: spam-bot-3000.py twitter [-h] [-j JOB_DIR] [-t] [-u UNF] [-s] [-c] [-e] [-b]\n                          [-f] [-p] [-d]\nspam-bot-3000\noptional arguments:\n -h, --help\t\tshow this help message and exit\n -j JOB_DIR, --job JOB_DIR\n\t                choose job to run by specifying job's relative directory\n -t, --tweet-status \tupdate status with random promo from twit_promos.txt\n -u UNF, --unfollow UNF\n                        unfollow users who aren't following you back, UNF=number to unfollow\n\n query:\n -s, --scrape\t\tscrape for tweets matching queries in twit_queries.txt\n -c, --continuous\tscape continuously - suppress prompt to continue after 50 results per query\n -e, --english         \treturn only tweets written in English\n\nspam -\u003e browser:\n -b, --browser          favorite, follow, reply to all scraped results and\n                        thwart api limits by mimicking human in browser!\n\nspam -\u003e tweepy api:\n -f, --follow\t\tfollow original tweeters in twit_scrape_dump.txt\n -p, --promote\t\tfavorite tweets and reply to tweeters in twit_scrape_dump.txt with random promo from twit_promos.txt\n -d, --direct-message\tdirect message tweeters in twit_scrape_dump.txt with random promo from twit_promos.txt\n```\n\n## twitter example workflows\n1) continuous mode\n\t- `-cspf` scrape and promote to all tweets matching queries\n2) overwatch mode\n\t- `-s` scrape first\n\t- manually edit twit_scrape_dump.txt\n\t\t- add '-' to beginning of line to ignore\n\t\t- leave line unaltered to promote to\n\t- `-pf` then promote to remaining tweets in twit_scrape_dump.txt\n3) gleen common keywords, hashtags, screen names from scrape dumps\n\t- `bash gleen_keywords_from_twit_scrape.bash`\n\t\t- input file: twit_scrape_dump.txt\n\t\t- output file: gleened_keywords.txt\n            - results ordered by most occurrences first\n4) filter out keywords/hashtags from scrape dump\n    - manually edit gleened_keywords.txt by removing all relevent results\n    - `filter_out_strings_from_twit_scrape.bash`\n        - keywords input file: gleened_keywords.txt\t\t\n        - input file: twit_scrape_dump.txt\n\t\t- output file: twit_scrp_dmp_filtd.txt\n5) browser mode\n    - `-b` thwart api limits by promoting to scraped results directly in firefox browser\n\t\t- add username and password to lines 5 and 6 of credentials.txt respectively\n6) automatic scrape, filter, spam\n\t- `auto_spam.bash`\n\t\t- automatically scrape twitter for queries, filter out results to ignore, and spam remaining results\n7) specify job\n    - `-j studfinder_example/` specify which job directory to execute\n\nNote: if you don't want to maintain individual jobs in separate directories, you may create single credentials, queries, promos, and scrape dump files in main working directory.\n\n## facebook initial setup\n- create new client folder in 'facebook/clients/YOUR_CLIENT'\n- create new 'jobs.json' file to store your client's job information in the following format:\n\n\u003cjobs.json\u003e\n```\n{\"client_data\":\n\t{\"name\": \"\",\n\t\"email\": \"\",\n\t\"fb_login\": \"\",\n\t\"fb_password\": \"\",\n\t\"jobs\": [\n\t\t{\"type\": \"groups\",\n\t\t\t\"urls\": [\"\",\"\"],\n\t\t\t\"keywords_and\": [\"\",\"\"],\n\t\t\t\"keywords_or\": [\"\",\"\"],\n\t\t\t\"keywords_not\": [\"\",\"\"] },\n\t\t{\"type\": \"users\",\n\t\t\t\"urls\": [],\n\t\t\t\"keywords_and\": [],\n\t\t\t\"keywords_or\": [],\n\t\t\t\"keywords_not\": [] }\n\t]}\n}\n```\n\n## facebook usage\n- scrape user and group feed urls for keywords\n\t- `facebook-scraper.py clients/YOUR_CLIENT/`\n\t\t- results output to 'clients/YOUR_CLIENT/results.txt'\n\n## TODO\n- Flesh out additional suite of promotion and interaction tool for facebook platform\n- Organize platforms and their associated data and tools into their own folders and python scripts\n- Future updates will include modules for scraping and promoting to Instagram.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FtoadlyBroodle%2Fspam-bot-3000","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FtoadlyBroodle%2Fspam-bot-3000","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FtoadlyBroodle%2Fspam-bot-3000/lists"}