Giter VIP home page Giter VIP logo

magnetfinder's Introduction

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
  • qbittorrent-cli (*GitHub)

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

magnetfinder's People

Contributors

balupton avatar ducaale avatar gr3atwh173 avatar xel86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

magnetfinder's Issues

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.

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.

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

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.

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.

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:

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...

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?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.