๐Ÿˆ๐Ÿ“ฆ nyaa.si client library for Go. Fetch Anime, Manga, Music and more torrents

Related tags

Network go-nyaa
Overview

๐Ÿˆ ๐Ÿ“ฆ go-nyaa

Go Reference Go Report Card

nyaa.si client library for Go

Built on top of:
gofeed - search using RSS
colly - scrap torrent details page

Original idea:
ejnshtein/nyaa-api

Installation ๐Ÿ”จ

go get github.com/mmcdole/gofeed
go get github.com/gocolly/colly
go get -u github.com/irevenko/go-nyaa

Contributing ๐Ÿค

Contributions, issues and feature requests are welcome! ๐Ÿ‘
Feel free to check open issues.

Docs ๐Ÿ“’

Go reference, Examples

Search Example

Search returns []Torrent

import ( 
	"fmt"
	"log"

	"github.com/irevenko/go-nyaa/nyaa"
)

func main() {
    opt := nyaa.SearchOptions{
        Provider: "nyaa", // Provider is the only required option
        Query:    "LN",
        Category: "literature",
        SortBy:   "seeders",
        Filter:   "trusted-only",
    }

    torrents, err := nyaa.Search(opt)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(torrents)
}

Search Options

type SearchOptions struct {
	Provider string
	Query    string
	Category string
	SortBy   string
	Filter   string
}

Provider

  • nyaa - nyaa.si
  • sukebei - sukebei.nyaa.si

Query

  • your desired search string

Category

nyaa

  • all - All Categories
  • anime - All Anime
    • anime-amv
    • anime-eng
    • anime-non-eng
    • anime-raw
  • audio - All Audio
    • audio-lossless
    • audio-lossy
  • literature - All Literature
    • literature-eng
    • literature-non-eng
    • literature-raw
  • live-action - All Live Action
    • live-action-idol-prom
    • live-action-eng
    • live-action-non-eng
    • live-action-raw
  • pictures - All Pictures
    • pictures-graphics
    • pictures-photos
  • software - All Software
    • software-apps
    • software-games

sukebei

  • all - All Categories
  • art - All Art
    • art-anime
    • art-doujinshi
    • art-manga
    • anime-games
    • anime-pictures
  • real-life - All Real Life
    • real-life-photos
    • real-life-videos

SortBy

  • comments
  • downloads
  • date
  • seeders
  • leechers
  • size

Filter

  • no-filter
  • no-remakes
  • trusted-only

TorrentComments

TorrentComments returns []Comment

import ( 
	"fmt"
	"log"
	
	"github.com/irevenko/go-nyaa/nyaa"
)

func main() {
	comms, err := nyaa.TorrentComments("https://nyaa.si/view/1366002") // nyaa.si or sukebei.nyaa.si
	if err != nil {
		log.Fatal(err)
	}

	for _, v := range comms {
		fmt.Println("user: " + v.User)
		fmt.Println("at: " + v.Date)
		fmt.Println("text: " + v.Text)
		fmt.Println()
	}
}

TorrentDescription

TorrentDescription returns string

import ( 
	"fmt"
	"log"

	"github.com/irevenko/go-nyaa/nyaa"
)

func main() {
	desc, err := nyaa.TorrentDescription("https://nyaa.si/view/1366002") // nyaa.si or sukebei.nyaa.si
	if err != nil {
		log.Fatal(err)
	}

   	fmt.Println(desc)
}

TorrentFiles

TorrentFiles returns []string

import ( 
	"fmt"
	"log"

	"github.com/irevenko/go-nyaa/nyaa"
)

func main() {
	files, err := nyaa.TorrentFiles("https://nyaa.si/view/1366002") // nyaa.si or sukebei.nyaa.si
	if err != nil {
		log.Fatal(err)
	}

	for _, v := range files {
		fmt.Println(v)
	}
}

Notes

  • Pagination does not work with RSS
  • Ascending sort does not work with RSS

Quick Start ๐Ÿš€

git clone https://github.com/irevenko/go-nyaa.git
cd go-nyaa
go get -d ./...
go run _examples/nyaa_search.go

What I Learned ๐Ÿง 

  • RSS Feed, xml
  • Parsing html in Go

License ๐Ÿ“‘

(c) 2021 Ilya Revenko. MIT License

Owner
Ilya Revenko
๐Ÿ—ป work work work ๐Ÿœ
Ilya Revenko
Torrent client designed for seeding tens of thousands of torrents.

Gamayun This project is currently a prototype. It is not usable in any shape or form. One day, this will be an efficient BitTorrent client, handling l

Dominik Honnef 14 Jul 27, 2022
Go-fetch-words - Fetch 5 letter words from dictionary.com

Go-fetch-words This GO app fetches 5 letter words from dictionary.com and saves

Royson 1 Jun 23, 2022
Fetch-npm-package - A small utility that can be used to fetch a given version of a NPM package

Use fetch-npm-package <package> <version> <output-dir> E.g. fetch-npm-package is

Bjรธrn Erik Pedersen 1 May 21, 2022
๐Ÿˆ๐ŸŒ nyaa.si terminal BitTorrent tracker

koneko - TUI Client for nyaa.si ?? ?? Download Anime, Literature, Audio, Live Action, Pictures, Software Data - go-nyaa TUI - tview Installation ?? go

Ilya Revenko 160 Jul 28, 2022
torsniff - a sniffer that sniffs torrents from BitTorrent network

torsniff - a sniffer that sniffs torrents from BitTorrent network English | ็ฎ€ไฝ“ไธญๆ–‡ Introduction torsniff is a torrent sniffer, it sniffs torrents that p

null 3.8k Aug 1, 2022
search yts.mx for torrents

movies - search yts.mx for torrents install: go build && sudo mv movies /usr/local/bin --query QUERY, -q QUERY QUERY to search --rating RAT

Luke Krikorian 3 Jan 20, 2022
๐ŸŒ• Server application for storing doujinshi, manga, art collections and other galleries with API and user control. Written in Go.

?? Server application for storing doujinshi, manga, art collections and other galleries with API and user control. Written in Go.

null 9 Jul 25, 2022
unofficial Manganato's manga downloader CUI written in Go

manganato-cli Unofficial Manganato's manga downloader CUI and CLI written in Go. note: currently works on Mac and Linux, for Windows, please run via D

Mahnun Saratunti 11 Feb 22, 2022
A Go client used to fetch information from the Go API

Hilo Client Go Hilo API Go client, Introduction This is a (partial) Go client used to fetch information from the Go API, most of the reverse engineeri

Valentin T. 0 Nov 27, 2021
fetch and serve papers in p2p network

sci-hub P2P A project aims to fetch paper from the BitTorrent network. This is not a cli client of sci-hub website. English Introduction ไธญๆ–‡็ฎ€ไป‹ Contribu

Sci-Hub on P2P 183 Jul 23, 2022
fetch papers from p2p network

sci-hub P2P A project aims to fetch paper from the BitTorrent network. According to this Reddit post, currently, all `sci-hub's papers are available i

Trim21 183 Jul 23, 2022
Small wrapper for containers/image which exposes a HTTP API to fetch

CLI to expose containers/image fetching via HTTP This is a small CLI program which vendors the containers/image Go library and exposes a HTTP API to f

Colin Walters 2 Nov 1, 2021
fetch data from different databses

how to install make a folder with: - dbAgent.exe - config - log *config and log are folders make a config as mentioned below and put it inside config

null 0 Nov 22, 2021
It is a proxy to improve article readability, a directory for your favorite articles, and a way to make the internet lighter and more accessible.

timoneiro It is a work in progress. Some features are unimplemented yet. The helmsman's goal is to be a way to browse articles without all the distrac

Cesar Gimenes 6 Jun 13, 2022
A MCBE Proxy supporting fast transfer and much more!

Downloads Pipelines Here you can find all the build please select the latest and click Artifacts

sun_proxy 29 Jul 22, 2022
Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

gRPC Ecosystem 4.8k Aug 10, 2022
red-tldr is a lightweight text search tool, which is used to help red team staff quickly find the commands and key points they want to execute, so it is more suitable for use by red team personnel with certain experience.

Red Team TL;DR English | ไธญๆ–‡็ฎ€ไฝ“ What is Red Team TL;DR ? red-tldr is a lightweight text search tool, which is used to help red team staff quickly find t

ๅ€พๆ—‹ 157 Jul 6, 2022
Fetches one or more DNS zones via AXFR and dumps in Unix hosts format for local use

axfr2hosts About axfr2hosts is a tool meant to do a DNS zone transfer in a form of AXFR transaction of one or more zones towards a single DNS server a

Dinko Korunic 7 Jun 24, 2022