- Notifications
You must be signed in to change notification settings - Fork6
🐈📦 nyaa.si client library for Go
License
irevenko/go-nyaa
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
nyaa.si client library for Go
Built on top of:
gofeed - search using RSS
colly - scrap torrent details page
Original idea:
ejnshtein/nyaa-api
go get github.com/mmcdole/gofeed
go get github.com/gocolly/colly
go get -u github.com/irevenko/go-nyaa
Contributions, issues and feature requests are welcome! 👍
Feel free to checkopen issues.
Search
returns[]Torrent
import ("fmt""log""github.com/irevenko/go-nyaa/nyaa")funcmain() {opt:= nyaa.SearchOptions{Provider:"nyaa",// Provider is the only required optionQuery:"LN",Category:"literature",SortBy:"seeders",Filter:"trusted-only", }torrents,err:=nyaa.Search(opt)iferr!=nil {log.Fatal(err) }fmt.Println(torrents)}
typeSearchOptionsstruct {ProviderstringQuerystringCategorystringSortBystringFilterstring}
nyaa
- nyaa.sisukebei
- sukebei.nyaa.si
- your desired search string
all
- All Categoriesanime
- All Animeanime-amv
anime-eng
anime-non-eng
anime-raw
audio
- All Audioaudio-lossless
audio-lossy
literature
- All Literatureliterature-eng
literature-non-eng
literature-raw
live-action
- All Live Actionlive-action-idol-prom
live-action-eng
live-action-non-eng
live-action-raw
pictures
- All Picturespictures-graphics
pictures-photos
software
- All Softwaresoftware-apps
software-games
all
- All Categoriesart
- All Artart-anime
art-doujinshi
art-manga
art-games
art-pictures
real-life
- All Real Lifereal-life-photos
real-life-videos
comments
downloads
date
seeders
leechers
size
no-filter
no-remakes
trusted-only
TorrentComments
returns[]Comment
import ("fmt""log""github.com/irevenko/go-nyaa/nyaa")funcmain() {comms,err:=nyaa.TorrentComments("https://nyaa.si/view/1366002")// nyaa.si or sukebei.nyaa.siiferr!=nil {log.Fatal(err)}for_,v:=rangecomms {fmt.Println("user: "+v.User)fmt.Println("at: "+v.Date)fmt.Println("text: "+v.Text)fmt.Println()}}
TorrentDescription
returnsstring
import ("fmt""log""github.com/irevenko/go-nyaa/nyaa")funcmain() {desc,err:=nyaa.TorrentDescription("https://nyaa.si/view/1366002")// nyaa.si or sukebei.nyaa.siiferr!=nil {log.Fatal(err)}fmt.Println(desc)}
TorrentFiles
returns[]string
import ("fmt""log""github.com/irevenko/go-nyaa/nyaa")funcmain() {files,err:=nyaa.TorrentFiles("https://nyaa.si/view/1366002")// nyaa.si or sukebei.nyaa.siiferr!=nil {log.Fatal(err)}for_,v:=rangefiles {fmt.Println(v)}}
- Pagination does not work with RSS
- Ascending sort does not work with RSS
git clone https://github.com/irevenko/go-nyaa.git
cd go-nyaa
go get -d ./...
go run _examples/nyaa_search.go
- RSS Feed, xml
- Parsing html in Go
(c) 2021 Ilya Revenko.MIT License
About
🐈📦 nyaa.si client library for Go
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.