Package: rarbgcli
RARBG-CLIrarbgcliâš âš âš âš âš 
Sadly the officialrarbg.tois down for good, but this script will continue to work on similar mirrors likehttps://rargb.to/âš âš âš âš âšRARBG command line interface for scraping therarbg.totorrent search engine.Outputs a torrent information as JSON from ararbg.tosearch.You can even pipe|the magnet links to your favorite bittorrent clientInstallationFrom PyPi (stable)pip install rarbgcliFrom source (latest)pip install git+https://github.com/FarisHijazi/rarbgcliUsageBoth aliases are valid for the same command:rarbgorrarbgcliusage:
    [-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,}]
    [--block_size SIZE] [--no_cache] [--no_cookie]
    search

positional arguments:
search                Search term

optional arguments:
-h, --help            show this help message and exit
--category {movies,xxx,music,tvshows,software,games,nonxxx,}, -c {movies,xxx,music,tvshows,software,games,nonxxx,}
--limit LIMIT, -l LIMIT
                        Limit number of torrent magnet links (default: inf)
--domain DOMAIN       Domain to search, you could put an alternative mirror domain here (default: rarbgunblocked.org)
--order {data,filename,leechers,seeders,size,}, -r {data,filename,leechers,seeders,size,}
                        Order results (before query) by this key. empty string means no sort (default: )
--descending          Order in descending order (only available for --order) (default: False)
--interactive, -i     Force interactive mode, show interctive menu of torrents (default: None)
--download_torrents, -d
                        Open torrent files in browser (which will download them) (default: None)
--magnet, -m          Output magnet links (default: False)
--sort {title,date,size,seeders,leechers,}, -s {title,date,size,seeders,leechers,}
                        Sort results (after scraping) by this key. empty string means no sort (default: )
--block_size SIZE, -B SIZE
                        Display torrent sizes in units of SIZE (default: auto)
--no_cache, -nc       Don't use cached results from previous searches (default: False)
--no_cookie, -nk      Don't use CAPTCHA cookie from previous runs (will need to resolve a new CAPTCHA) (default: False)Examplerarbgcli"the stranger things 3"--categorymovies--limit10--magnetPiping|The program is pipe-friendly, so you could use this tool in conjunction with thejqcommand to filter the JSON output, and then pipe it to your favorite torrent client.The--magnetoption is a convenience option instead of filtering it every time withjq, the bellow 2 lines are equivalent:rarbgcli"the stranger things 3"--categorymovies--limit10|jq.[].magnet|xargsqbittorrent
rarbgcli"the stranger things 3"--categorymovies--limit10--magnet|xargsqbittorrentCAPTCHACAPTCHA should automatically be solved using Selenium Chrome driver andtesseract.In the case that it doesn't, see the instructions at the bottom to manually solve the CAPTCHA and save the cookies.To get around the captcha, the user will be prompted to solve it and enter the cookie in the terminal.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.This might be automated one day, because it is possible.Developmentmake changes./test.sh# make sure tests passgit commit ..../build.sh# will push automaticallyTo-do listadd interactive modeadd option to download the .torrent filesadd api options (for importing using python)