Optimized for python 3.6
Bot for monitoring hot posts in some playboy´s subreddits. Once a new post is found, a repost is made at r/PlayboyOnReddit.
Posts on r/PlayboyOnReddit are meant to be made only by this bot.
For installing the requirements, in your venv or anaconda env, just run the following command:
pip install -r requirements.txtBot's cron:
0-59/1 * * * * sh /home/ec2-user/PlayboyOnReddit/src/run_bot.shGarbage Collector's cron:
00 00 01 * * sh /home/ec2-user/PlayboyOnReddit/src/run_garbage_collectors.sh.
└── PlayboyOnReddit
├── data
│ └── submissions_processed.txt
├── docs
│ ├── reference_articles
│ ├── ...
│ └── CREDITS
├── src
│ ├── __init__.py
│ ├── bot.py
│ ├── helpers.py
│ ├── run_bot.sh
│ ├── run_garbage_collectors.sh
│ └── settings.json
├── tests
│ └── unittests
│ ├── data
│ └── __init__.py
├── .gitignore
├── LICENSE
├── README.md
└── requirements.txt- data: The data dir. Group of non-script support files.
- docs: The documentation dir.
- src: The scripts & source code dir.
- tests: The unittests dir.
Section aimed on clarifying some running issues.
For running it, at the ~/src directory just run:
python bot.pyor, if importing it as a module, just run:
from bot import Bot
if __name__ == '__main__':
Bot().__call__(){
"USER_AGENT": "Created by u/PlayboyOnReddit.",
"USERNAME": "username",
"PASSWORD": "password",
"CLIENT_ID": "client_id",
"CLIENT_SECRET": "client_secret",
"SUBREDDIT_TO_POST": "PlayboyOnReddit",
"SUBREDDITS_TO_MONITOR" : [
"playboy",
"Playboy_Albums",
"playboy_playmates"
],
"BLACKLIST": [
"Request",
"Discussion"
],
"IGNORE_ID": [
"72xlrr",
"67sd9y"
],
"SEARCH_LIMIT": 6,
"POST_MODE": "direct"
}obs: in order to run this application you must have a json file at ~/src/settings.json. This json must follow the structure above.
obs: If you know of any sub that should be being monitored, please send a direct to moderators or make a commentary on this post.