{"id":16975642,"url":"https://github.com/farishijazi/rarbgcli","last_synced_at":"2025-03-17T08:38:07.599Z","repository":{"id":44542808,"uuid":"512568982","full_name":"FarisHijazi/rarbgcli","owner":"FarisHijazi","description":"RARBG command line interface for scraping the rarbg.to torrent search engine","archived":false,"fork":false,"pushed_at":"2023-09-04T02:48:27.000Z","size":3733,"stargazers_count":50,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T21:48:36.965Z","etag":null,"topics":["crawler","rarbg","rarbg-torrentapi","torrent","torrents","torrents-crawler"],"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/FarisHijazi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-11T00:21:02.000Z","updated_at":"2025-02-11T02:45:55.000Z","dependencies_parsed_at":"2024-10-27T12:47:35.213Z","dependency_job_id":"a7b05e0b-a413-4feb-bec8-619c5aea1915","html_url":"https://github.com/FarisHijazi/rarbgcli","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":"0.024390243902439046","last_synced_commit":"53a5af0645b45fca10d6ea821042ac692a67379d"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarisHijazi%2Frarbgcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarisHijazi%2Frarbgcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarisHijazi%2Frarbgcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarisHijazi%2Frarbgcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FarisHijazi","download_url":"https://codeload.github.com/FarisHijazi/rarbgcli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243853656,"owners_count":20358454,"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":["crawler","rarbg","rarbg-torrentapi","torrent","torrents","torrents-crawler"],"created_at":"2024-10-14T01:23:23.870Z","updated_at":"2025-03-17T08:38:07.051Z","avatar_url":"https://github.com/FarisHijazi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [RARBG-CLI `rarbgcli`](https://github.com/FarisHijazi/rarbgcli)\n\n⚠⚠⚠⚠⚠\nSadly the official [rarbg.to](https://rarbg.to) is down for good, but this script will continue to work on similar mirrors like [https://rargb.to/](https://rargb.to/)\n⚠⚠⚠⚠⚠\n\n---\n\nRARBG command line interface for scraping the [rarbg.to](rarbg.to) torrent search engine.\n\nOutputs a torrent information as JSON from a [rarbg.to](rarbg.to) search.\n\n![usage interactive](assets/usage_interactive.gif)\n\n---\n\nYou can even pipe `|` the magnet links to your favorite bittorrent client\n\n![usage pipe](assets/usage_pipe_to_client.gif)\n\n## Installation\n\nFrom PyPi (stable)\n\n    pip install rarbgcli\n\nFrom source (latest)\n\n    pip install git+https://github.com/FarisHijazi/rarbgcli\n\n## Usage\n\nBoth aliases are valid for the same command: `rarbg` or `rarbgcli`\n\n    usage:\n        [-h] [--category {movies,xxx,music,tvshows,software,games,nonxxx,}] [--limit LIMIT] [--domain DOMAIN] [--order {data,filename,leechers,seeders,size,}] [--descending] [--interactive] [--download_torrents] [--magnet] [--sort {title,date,size,seeders,leechers,}]\n        [--block_size SIZE] [--no_cache] [--no_cookie]\n        search\n\n    positional arguments:\n    search                Search term\n\n    optional arguments:\n    -h, --help            show this help message and exit\n    --category {movies,xxx,music,tvshows,software,games,nonxxx,}, -c {movies,xxx,music,tvshows,software,games,nonxxx,}\n    --limit LIMIT, -l LIMIT\n                            Limit number of torrent magnet links (default: inf)\n    --domain DOMAIN       Domain to search, you could put an alternative mirror domain here (default: rarbgunblocked.org)\n    --order {data,filename,leechers,seeders,size,}, -r {data,filename,leechers,seeders,size,}\n                            Order results (before query) by this key. empty string means no sort (default: )\n    --descending          Order in descending order (only available for --order) (default: False)\n    --interactive, -i     Force interactive mode, show interctive menu of torrents (default: None)\n    --download_torrents, -d\n                            Open torrent files in browser (which will download them) (default: None)\n    --magnet, -m          Output magnet links (default: False)\n    --sort {title,date,size,seeders,leechers,}, -s {title,date,size,seeders,leechers,}\n                            Sort results (after scraping) by this key. empty string means no sort (default: )\n    --block_size SIZE, -B SIZE\n                            Display torrent sizes in units of SIZE (default: auto)\n    --no_cache, -nc       Don't use cached results from previous searches (default: False)\n    --no_cookie, -nk      Don't use CAPTCHA cookie from previous runs (will need to resolve a new CAPTCHA) (default: False)\n\nExample\n\n```sh\nrarbgcli \"the stranger things 3\" --category movies --limit 10 --magnet\n```\n\n### Piping `|`\n\nThe program is pipe-friendly, so you could use this tool in conjunction with the [jq](https://stedolan.github.io/jq/) command to filter the JSON output, and then pipe it to your favorite torrent client.\n\nThe `--magnet` option is a convenience option instead of filtering it every time with `jq`, the bellow 2 lines are equivalent:\n\n```sh\nrarbgcli \"the stranger things 3\" --category movies --limit 10 | jq .[].magnet | xargs qbittorrent\nrarbgcli \"the stranger things 3\" --category movies --limit 10 --magnet | xargs qbittorrent\n```\n\n## CAPTCHA\n\nCAPTCHA should automatically be solved using Selenium Chrome driver and `tesseract`.\n\nIn the case that it doesn't, see the instructions at the bottom to manually solve the CAPTCHA and save the cookies.\n\n~To get around the captcha, the user will be prompted to solve it and enter the cookie in the terminal.~\n\n~I tried many ways to automate this process (using selenium and tesseract), but it just ends up being overkill, hard to maintain across platforms, and I still didn't get it to work.~\n\n~This might be automated one day, because it is possible.~\n\n![](assets/solvingCAPTCHA.gif)\n\n## Development\n\n- make changes\n- `./test.sh` # make sure tests pass\n- `git commit ...`\n- `./build.sh` # will push automatically\n\n### To-do list\n\n- [x] add interactive mode\n- [x] add option to download the .torrent files\n- [ ] add api options (for importing using python)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarishijazi%2Frarbgcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarishijazi%2Frarbgcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarishijazi%2Frarbgcli/lists"}