Skip to content

Bot for monitoring hot posts in some playboy´s subreddits. Once a new post is found, a repost is made at r/PlayboyOnReddit.

License

Notifications You must be signed in to change notification settings

ArrayOfThrones/playboy-on-reddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlayboyOnReddit: Reddit´s BOT

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.


Dependencies

For installing the requirements, in your venv or anaconda env, just run the following command:

pip install -r requirements.txt

Server's CRON

Bot's cron:

0-59/1 * * * * sh /home/ec2-user/PlayboyOnReddit/src/run_bot.sh

Garbage Collector's cron:

00 00 01 * * sh /home/ec2-user/PlayboyOnReddit/src/run_garbage_collectors.sh

Project's Structure

.
└── 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

Directory description

  • data: The data dir. Group of non-script support files.
  • docs: The documentation dir.
  • src: The scripts & source code dir.
  • tests: The unittests dir.

Usage Notes

Section aimed on clarifying some running issues.

Running

For running it, at the ~/src directory just run:

python bot.py

or, if importing it as a module, just run:

from bot import Bot

if __name__ == '__main__':
    Bot().__call__()

JSON structure

{
  "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.


Monitored r/

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.


About

Bot for monitoring hot posts in some playboy´s subreddits. Once a new post is found, a repost is made at r/PlayboyOnReddit.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published