Multi-threaded CLI torrent scraper for displaying searched for magnet links; tailored for use with plex & ssh.

Overview

magnetfinder

Multi-threaded CLI torrent aggregator; scrapes torrent results from multiple websites and delivers them into a table in your terminal!

Supported Websites:

  • nyaa
  • piratebay
  • YTS

Supported torrent client for autodownloads:

  • deluge-console
  • transmission-cli

Usage

Running magnetfinder without any arguments will launch interactive mode, prompting for similar information set by flags.

Flags/Arguments

-q, --query <query> search query to use
-n, --nyaa scrape nyaa for torrents
-p, --piratebay scrape piratebay for torrents
-y, --yts get torrents from YIFY/YTS
-a, --all scrape all available websites together
-d, --download autodownload the torrent(s) selected
--depth <depth> specifies how many pages to search through for each website, default is 1
--dir <directory> directory to download torrent if autodownload was toggled
--sort <seeds/size> allows you to specifiy if the torrent table is sorted by seeders or size
--proxy <proxy url> allows you to set a proxy to use when making web requests to torrent websites & api
--show <num> truncate list of torrents displayed by the number argument given
--no-interactive displays all torrents with magnet directly without interacting (--show is useful here)

Configuration

Settings.toml (for setting default behavior, such as download directories & autodownload) is located in an OS specific directory:
~/.config/magnetfinder/ on Linux
/AppData/Roaming/magnetfinder on Windows
/Library/Application Support/magnetfinder/ on macOS

Installation

First install rust if you haven't already: https://www.rust-lang.org/tools/install

From Cargo/Crate: cargo install magnetfinder

From Source:

  • git clone https://github.com/bleusakura/magnetfinder.git then cargo build --release
  • After building, the binary will be located in ./target/release/, which can then be moved elsewhere.

You can also decide to skip compiling and download a binary from the releases section

Comments
  • Proxy support

    Proxy support

    Hi! I think it would be nice to support proxies, since torrent trackers are blocked in some countries. I haven't look at your code, but Cargo.toml indicates that you use reqwest, which does support proxies. I would start from socks, since it allows one to use tor. Do you need help with that?

    opened by teenjuna 4
  • request to disable downloads directory

    request to disable downloads directory

    > magnetfinder -aq 'big buck bunny'
    Error getting downloads directory, falling back to home directory
    

    I want to use this programatically to grab magnet links for specfic matches

    opened by balupton 3
  • Feature request: Allow other download options

    Feature request: Allow other download options

    It would be great to download magnets for download at a later time, particularly for those using unsupported clients - like transmission etc. I will try to take a crack at this...

    opened by alphastrata 2
  • no result error should be stderr

    no result error should be stderr

    no idea if this is correct, first line of rust code I've written

    the reason we want this is so that doing magnet="$(magnetfinder --no-interactive --show 5 -aq 'asdlkasldkaslkdaslkdasd')" has magnet='' instead of the error message

    opened by balupton 1
  • unable to use programatically

    unable to use programatically

    The following bash code does not provide the prompt, causing it to just hang

    m="$(magnetfinder -aq 'big buck bunny')"
    

    Everything besides the magnet result should be outputted to /dev/tty or /dev/stderr instead of stdout. Perhaps https://docs.rs/ttyecho/0.1.2/ttyecho/ will help.

    That said, providing #8 will work around this.

    opened by balupton 1
  • request for no interactive mode

    request for no interactive mode

    would be good to have an option like --no-interactive to have the results only be the name, then a tab character, then the magnet link, e.g.

    > magnetfinder -aq 'big buck bunny'
    big-buck-bunny-NTSC.iso	magnet:?xt=urn:btih:FC84B941DC640BE59C90D7AB58819D50EDCFF906&dn=big-buck-bunny-NTSC.iso
    Big Buck Bunny 480p (x264, he-aac)	magnet:?xt=urn:btih:05D51D7153228E08D94F850E5D2CE0A9E764752E&dn=Big+Buck+Bunny+480p+%28x264%2C+he-aac%29
    

    would also be good for a paramater to specify how many results/rows should be returned

    opened by balupton 1
  • if no results are returned, it enters an invalid state

    if no results are returned, it enters an invalid state

    > magnetfinder -aq 'asdklasdklasdklasdksadlkasdlksaldkasldkasldkasdasdkasldkasld'
    Error getting downloads directory, falling back to home directory
    ╭───┬──────┬──────┬───────╮
    │ # ┆ Name ┆ Size ┆ Seeds │
    ╞═══╪══════╪══════╪═══════╡
    ╰───┴──────┴──────┴───────╯
    Type 'n' to display 20 more torrents, or select torrent(s) by #:
    

    It should not be interactive if no results are returned.

    opened by balupton 1
  • Settings.toml changes to improve usability

    Settings.toml changes to improve usability

    I suggest adding the following to Settings.toml such at a query like

    magnetfinder --all --depth 10 --show 100 -q "arch linux iso" can be reduced to magnetfinder "arch linux iso"

    • piratebay = "true"
    • nyaa = "true"
    • yts = "true"
    • depth = 10
    • show = 100
    • proxy = "some_proxy_value"

    I figure I can do all this with aliases, but it would be nice to have it as part of the config.

    opened by carneeki 1
  • Library version

    Library version

    I was checking out crates that relate to searching torrents and apparently magnetfinder is leagues ahead of everything else. I especially like that it's available as a binary since this allows for easy interoperability from programs in other languages, and I do think this is much better than having only library bindings, however I believe it would be a lot better to have the option of using it as a library when programming in Rust, especially considering how much easier it would be to deal with all the types and validations and stuff.

    As it stands, the Readme doesn't even mention the possibility of using this as a Library, and from what little code I skimmed through it seems there were no plans to have this work as anything other than a CLI program, but what I've seen also indicates that, although there a few prints here and there, there are actually not that many places in the code that depend on user interaction, and this suggests that it may not be that hard to isolate such interactions from the code that actually deals with the provides, making it more straightforward to use this as a library in other Rust projects.

    Though, obviously, there's a need to decide on how useful such changes would be and whether it'd be worth doing such changes, but that's not for me to decide so I just came to point it out.

    opened by frnco 1
  • Make installation easier by providing prebuilt binaries+ installation script

    Make installation easier by providing prebuilt binaries+ installation script

    The binaries can be automatically built and published via a GitHub action whenever a new git tag is pushed to this repository. I also think it might be convenient to have a install.sh script that downloads the latest binary and places it in /usr/local/bin.

    These files could be used as a reference if needed:

    • https://github.com/ducaale/xh/blob/master/.github/workflows/release.yaml
    • https://github.com/ducaale/xh/blob/master/install.sh
    opened by ducaale 1
Owner
null
A Rust on-site channel benchmarking helper. Inter-Process (async / busy) & Intra-Process (async single threaded / async multi threaded)

On-Site Rust Channel Benchmarking Helper Deploy on server to determine which public crates are the fastest for communicating in different architecture

null 23 Jul 9, 2024
Automatically replace Discord CDN links with local file links, by downloading the images to the public folder

Auto Undiscord Did you hear that Discord will be blocking external websites from using images hosted on their servers? Did you host every image on you

Dot32 5 Nov 17, 2023
A customizable MCTS planner with advanced featured tailored to multi-agent simulations and emergent narratives.

NPC engine Core:  Utils:  © 2020-2022 ETH Zurich and other contributors. See AUTHORS.txt for more details. A customizable Monte Carlo Tree Search (MCT

Game Technology Center, ETH Zurich 30 Jun 6, 2023
An easy-to-use, incremental, multi-threaded garbage collector for Rust

Refuse An easy-to-use, incremental, multi-threaded garbage collector for Rust. //! A basic usage example demonstrating the garbage collector. use refu

Khonsu Labs 6 May 3, 2024
A multi-threaded Twitch chat archiving and downloading tool.

Twitch Chat Downloader ??️ tcd is a multi-threaded Twitch Chat Downloader built in Rust ?? . Usage: tcd [OPTIONS] <--channel <CHANNEL>|--video <VIDEO>

Matthew Polak 6 Dec 19, 2022
💫 Easy to use, robust Rust library for displaying spinners in the terminal

spinoff an easy to use, robust library for displaying spinners in the terminal ?? Install Add as a dependency to your Cargo.toml: [dependencies] spino

ad4m 401 Jun 24, 2023
Plex webhook service to automatically update your Anilist watching list.

anifunnel Plex webhook service to automatically update your Anilist watching list. Description anifunnel is a web server that will consume incoming Pl

Hamuko 3 Dec 12, 2022
😎 A CLI tool for fetching data and displaying it nicely

?? A CLI tool for fetching data and displaying it nicely. (The neofetch for remote data fetching)

Milo 6 Aug 24, 2022
CLI tool for displaying table

tv Format json into table display $ cat test.json [ { "name": "test", "age": 10, "lang": "ja" }, { "name": "uzimaru", "age":

uzimaru0000 322 Jan 7, 2023
A ln scraper to read light novels and watch anime in your terminal (Written in rust)

Readme Table of content Why use kami Dependencies Install Linux/mac Windows Honorable mentions Why use kami Well its a fast and easy way to watch anim

mrfluffy 26 Dec 23, 2022
A rust-cli to track and practise all your DSA links :)

Abhyas Abhyas is a Rust command-line application for managing and interacting with a database of links. Features Check Status: Get the total, complete

Harshal Jadhav 3 Nov 25, 2023
A small CLI wrapper for authenticating with SSH keys from Hashicorp Vault

vaultssh A small CLI wrapper for authenticating with SSH keys from Hashicorp Vault vaultssh is a small CLI wrapper for automatically fetching and usin

Joshua Gilman 50 Dec 10, 2022
Akamai Krypton CLI and SSH Agent (v2)

Akamai "Krypton" FIDO2 SSH Agent and CLI The akr command line utility is Akamai's "Krypton" SSH Agent, the successor to kr which works exclusively wit

Akamai 57 Jan 4, 2023
Failed experiment in downloading random cat image, turning it into ascii and displaying it in Neovim.

cat.nvim Failed experiment in downloading random cat image, turning it into ascii and displaying it in Neovim. Failed as I realized far too late, that

James Vero 4 Aug 5, 2022
A Rust synchronisation primitive for "Multiplexed Concurrent Single-Threaded Read" access

exit-left verb; 1. To exit or disappear in a quiet, non-dramatic fashion, making way for more interesting events. 2. (imperative) Leave the scene, and

Jonathan de Jong 0 Dec 5, 2021
fixred is a command line utility to fix outdated links in files with redirect URLs.

fixred fixred is a command line utility to fix outdated links in files with redirect URLs. Installation fixred is installed via cargo package manager.

Linda_pp 35 Aug 6, 2022
Store your transfer.sh links, so you can remember them later and know when they will expire, but now written in Rust.

Transfer.sh helper Rusted The idea of the script is to store your transfer.sh links and simplify its usage, so you can remember them later and know wh

Reinaldo Rozato Junior 10 Nov 30, 2022
🌊 ~ seaward is a crawler which searches for links or a specified word in a website.

?? seaward Installation cargo install seaward On NetBSD a pre-compiled binary is available from the official repositories. To install it, simply run:

null 3 Jul 16, 2023
🦴🖥️ // An ssh manager

?? ??️ ssh-man ssh-man is an SSH manager. I often forget the credentials and IPs to servers I frequently SSH into so Im making ssh-man to help me reme

mellowmarshe 4 Dec 9, 2021