Crunchyroll Guest Pass Publisher for Reddit
Project description
CrunchyBot
Description:
This is a simple bot/script I made to publish my CrunchyRoll Guest Passes to Reddit. It uses Selenium and Chromedriver to extract the valid guest passes from CrunchyRoll and PRAW to publish it /r/Crunchyroll's weekly Megathread. This is not a bot made to run indefinitely; however, it can be altered to do so if one so desired. It was intended for use in conjunction with a task scheduler/cronjob to check once every month (or four if you wish to publish them in sets before guest passes expire) for new guest passes.
Changes:
Due to how the PRAW library has changed, all users now must create a reddit script app. As such, the data file now must include additional data. See below for a quick guide on how to set this up.
Setting Up Reddit Account:
- Log on to the bot account.
- Go the bot account's
preferences
from the upper-right corner. - Click the
apps
tab. - Click the
create another app
. - The button test may appear differently if you have no apps setup. - In the prompts, ensure that the
script
radio button is toggled andredirected uri
is is set tohttp://localhost:8080
. The other fields can be filled with whatever you want. - Click
create app
button when done. - You should now see the app created. Right below the name and below
personal use script
will be yourclient_id
. Within the box, to the right of the wordsecret
, is yourclient_secret
.
Requirement:
- Selenium
- Chrome
- PRAW 6.1.0+
- Python 3.5+
Prerequisites:
You will need to have Chrome installed on your system at its default installation path.
This is due to the chromedriver
working with your Chrome installation to retrieve
Crunchyroll Guest Pass.
Note As of 4.0.0
, chromedriver
will not be provided. Please refer to link
on setting up
If you would rather use bring in chromedriver
yourself, the version of chromedriver
that has been verified to work is 2.45
. Replace the chromedriver
under the bin/
directory.
With Pipenv
Assuming you have pipenv
installed on your system, run the following within the repo:
$ pipenv --three
This will setup a virtual environment for Crunchybot to work in without interferring your other python projects.
With pipenv
initialized, run:
$ pipenv install
This will use the Pipfile
and Pipfile.lock
to fetch and verify dependencies.
Without Pipenv
Install PRAW and Selenium by running the following command:
$ pip install -r requirements.txt
The other requirements are included in the bin
directory of the project.
How to Use:
- Clone the project
git clone https://github.com/lamdaV/CrunchyBot.git
- Navigate to where you clone the repository
cd CrunchyBot
- Update the templated
botData.json
with your information. - Run
pipenv run python src/CrunchyBot.py [--debug/-d] /path/to/botData.json // or python src/CrunchyBot.py [--debug/-d] /path/to/botData.json
Automating:
Add the Python script to the Windows Task Scheduler with monthly frequency. Here is a link to setup the Task Scheduler.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file crunchy_bot-4.0.1.tar.gz
.
File metadata
- Download URL: crunchy_bot-4.0.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb31a44a748df4dfce8a7bda4e9c0119436139b67596bffcc1a0445122a6c6c |
|
MD5 | 2f8650afa6fb8cc25b8480497ca2c0d0 |
|
BLAKE2b-256 | eb97cf7cb489e204dd30b87646add78ecc2c1f17c2c9d680977f25118928a0d7 |
Provenance
File details
Details for the file crunchy_bot-4.0.1-py3-none-any.whl
.
File metadata
- Download URL: crunchy_bot-4.0.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1a8ed3604d86e51d675b5dfa9e4b5cb5fac5988e78dd1e7d2952630b55c8713 |
|
MD5 | c156e75f66938fbf7192f96234bca52d |
|
BLAKE2b-256 | d3c72fef57814f11d0c6623490c979dd3ed38052aa5438182aa6d92ed5e081ae |