{"id":15286422,"url":"https://github.com/lamdav/crunchybot","last_synced_at":"2025-08-01T09:40:45.726Z","repository":{"id":54570240,"uuid":"47477696","full_name":"lamdav/CrunchyBot","owner":"lamdav","description":"A CrunchyRoll Guest Pass Reddit publisher","archived":false,"fork":false,"pushed_at":"2021-02-10T07:18:57.000Z","size":61867,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T15:41:43.811Z","etag":null,"topics":["bot","crunchyroll","github-actions","praw","reddit"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/crunchy-bot/","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/lamdav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-06T00:12:17.000Z","updated_at":"2021-02-10T07:19:00.000Z","dependencies_parsed_at":"2022-08-13T20:01:03.269Z","dependency_job_id":null,"html_url":"https://github.com/lamdav/CrunchyBot","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamdav%2FCrunchyBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamdav%2FCrunchyBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamdav%2FCrunchyBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamdav%2FCrunchyBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamdav","download_url":"https://codeload.github.com/lamdav/CrunchyBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227456437,"owners_count":17777940,"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","crunchyroll","github-actions","praw","reddit"],"created_at":"2024-09-30T15:13:56.868Z","updated_at":"2024-12-01T00:07:56.460Z","avatar_url":"https://github.com/lamdav.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Actions Status](https://github.com/lamdaV/CrunchyBot/workflows/test%20and%20publish%20on%20tag/badge.svg)](https://github.com/lamdaV/CrunchyBot/actions)\r\n# CrunchyBot\r\n## Description:\r\nThis is a simple bot/script I made to publish my CrunchyRoll Guest Passes to Reddit.\r\nIt uses Selenium and Chromedriver to extract valid guest passes from CrunchyRoll\r\nand PRAW to publish it /r/Crunchyroll's weekly Megathread. This is not a bot made\r\nto run indefinitely; however, it can be altered to do so if one so desired.\r\nIt was intended for use in conjunction with a task scheduler/cronjob to check once every month\r\n(or four if you wish to publish them in sets before guest passes expire) for new guest passes.\r\n\r\n## Changes:\r\nDue to how the PRAW library has changed, all users now must create a\r\n[reddit script app](https://github.com/reddit/reddit/wiki/OAuth2).\r\nAs such, the data file now must include additional data. See below for a quick guide on how to set this up.\r\n\r\nAs of `4.0.0`, binaries for `chromedriver` and other tooling will not be included.\r\nPlease refer to [link](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver#quick-installation)\r\non setting up and installing `chromedriver`.\r\n\r\n## Setting Up Reddit Account:\r\n  1. Log on to the bot account.\r\n  2. Go the bot account's `preferences` from the upper-right corner.\r\n  3. Click the `apps` tab.\r\n  4. Click the `create another app`.\r\n    - The button test may appear differently if you have no apps setup.\r\n  5. In the prompts, ensure that the `script` radio button is toggled and\r\n     `redirected uri` is is set to `http://localhost:8080`. The other fields\r\n     can be filled with whatever you want.\r\n  6. Click `create app` button when done.\r\n  7. You should now see the app created. Right below the name and below `personal use script` will be your\r\n     `client_id`. Within the box, to the right of the word `secret`, is your `client_secret`.\r\n\r\n## Prerequisites:\r\nYou will need to have Chrome installed on your system at its default installation path.\r\nThis is due to the `chromedriver` working with your Chrome installation to retrieve\r\nCrunchyroll Guest Pass.\r\n\r\n**Note** As of `4.0.0`, `chromedriver` will not be provided.\r\nPlease refer to [link](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver#quick-installation)\r\non setting up.\r\n\r\n## Install:\r\n`pip install crunchy-bot`\r\n\r\n## Setup:\r\nRun `crunchy init` to generate config file:\r\n```json\r\n{\r\n  \"crunchy_username\": \"crunchy_user\",\r\n  \"crunchy_password\": \"crunchy_pass\",\r\n  \"reddit_client_id\": \"client_id\",\r\n  \"reddit_client_secret\": \"client_secret\",\r\n  \"reddit_user_agent\": \"CrunchyBot:v4.0.0 (hosted by /u/{YOUR_USERNAME})\",\r\n  \"reddit_username\": \"reddit_user\",\r\n  \"reddit_password\": \"reddit_pass\",\r\n  \"log_dir\": \"/tmp/crunchybot/logs\"\r\n}\r\n```\r\nor save this to `~/.crunchybot`.\r\n\r\nExecute `crunchy publish [--config path/to/.crunchybot] [--debug/-d]` to start scrapping and publishing.\r\n\r\n## Development\r\n### With poetry\r\nAssuming you have `pyenv` and `poetry` installed on your system, run the following within the repo:\r\n```shell\r\npyenv local 3.8 # supports 3.6 - 3.9\r\npoetry shell\r\n```\r\nThis will set up a virtual environment for Crunchybot to work in without interfering your\r\nother python projects.\r\n\r\nWith `poetry` initialized, run:\r\n```\r\n$ poetry install\r\n```\r\nThis will use the `poetry.lock` to fetch and verify dependencies.\r\n\r\n### Without Pipenv\r\nInstall PRAW and Selenium by running the following command:\r\n```\r\n$ pip install -e .\r\n```\r\n\r\nOnce setup with or without `poetry`, `crunchy` command line should be available for execution.\r\nThis will also generate a `version.py` using `setuptools_scm`.\r\n\r\nMake and test your changes locally. Pull Request are welcome.\r\n\r\n\r\n## Automating:\r\n### OSX/Linux\r\nRun `crontab -e` and add\r\n```\r\n0 0 1 * * zsh -lc \"/path/to/crunchy publish\"\r\n```\r\nYou can replace `zsh -lc` with your shell's equivalent. This is mainly to execute any of your profile\r\npresets that may handle setting up `PATH` and other required environment variables to run.\r\n\r\n### Windows\r\nAdd the Python script to the Windows Task Scheduler with monthly frequency.\r\nHere is a [link](https://blog.netwrix.com/2018/07/03/how-to-automate-powershell-scripts-with-task-scheduler/)\r\nto setup the Task Scheduler.\r\n\r\n### Github\r\n\u003e Note: Crunchyroll or Cloudflare have flagged ip coming from Github\r\n\u003e Actions CI. So, it's less likely to succeed now.\r\n\r\nYou can also fork this repository and utilize `Github Actions` to run this task on the first of each month.\r\nYou must add the required data as all cap snake case secret variables.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamdav%2Fcrunchybot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamdav%2Fcrunchybot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamdav%2Fcrunchybot/lists"}