{"id":13809064,"url":"https://github.com/irevenko/go-nyaa","last_synced_at":"2025-05-01T02:43:40.071Z","repository":{"id":41902894,"uuid":"353341792","full_name":"irevenko/go-nyaa","owner":"irevenko","description":"🐈📦 nyaa.si client library for Go","archived":false,"fork":false,"pushed_at":"2023-07-26T21:11:09.000Z","size":41,"stargazers_count":31,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T21:03:21.312Z","etag":null,"topics":["client","client-library","go","go-client","golang","nyaa","nyaa-api","nyaa-rss","nyaa-se","nyaa-si","nyaasi"],"latest_commit_sha":null,"homepage":"https://nyaa.si","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/irevenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-31T12:03:12.000Z","updated_at":"2024-08-20T06:55:44.000Z","dependencies_parsed_at":"2024-01-07T09:45:31.175Z","dependency_job_id":null,"html_url":"https://github.com/irevenko/go-nyaa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Fgo-nyaa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Fgo-nyaa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Fgo-nyaa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irevenko%2Fgo-nyaa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irevenko","download_url":"https://codeload.github.com/irevenko/go-nyaa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251815185,"owners_count":21648364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","client-library","go","go-client","golang","nyaa","nyaa-api","nyaa-rss","nyaa-se","nyaa-si","nyaasi"],"created_at":"2024-08-04T01:02:00.168Z","updated_at":"2025-05-01T02:43:40.030Z","avatar_url":"https://github.com/irevenko.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# 🐈📦 go-nyaa\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/irevenko/go-nyaa.svg)](https://pkg.go.dev/github.com/irevenko/go-nyaa)\n[![Go Report Card](https://goreportcard.com/badge/github.com/irevenko/go-nyaa)](https://goreportcard.com/report/github.com/irevenko/go-nyaa)\n\n\u003e nyaa.si client library for Go\n\n\u003ca href=\"https://github.com/nyaadevs\"\u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/28658394?s=200\u0026v=4\"\u003e\n\u003c/a\u003e\n\nBuilt on top of:\u003cbr\u003e\n\u003ca href=\"https://github.com/mmcdole/gofeed\"\u003egofeed\u003c/a\u003e - search using RSS \u003cbr\u003e\n\u003ca href=\"https://github.com/gocolly/colly\"\u003ecolly\u003c/a\u003e - scrap torrent details page \u003cbr\u003e \u003cbr\u003e\nOriginal idea: \u003cbr\u003e \u003ca href=\"https://github.com/ejnshtein/nyaa-api\"\u003eejnshtein/nyaa-api\u003c/a\u003e\n\n\n# Installation 🔨\n```go get github.com/mmcdole/gofeed``` \u003cbr\u003e\n```go get github.com/gocolly/colly``` \u003cbr\u003e\n```go get -u github.com/irevenko/go-nyaa```\n\n# Contributing 🤝\nContributions, issues and feature requests are welcome! 👍 \u003cbr\u003e\nFeel free to check [open issues](https://github.com/irevenko/go-nyaa/issues).\n\n# Docs 📒\n\u003ca href=\"https://pkg.go.dev/github.com/irevenko/go-nyaa\"\u003eGo reference\u003c/a\u003e, \n\u003ca href=\"https://github.com/irevenko/go-nyaa/tree/main/_examples\"\u003eExamples\u003c/a\u003e\n* [Search Example](#search-example \"Goto #search-example-\")\n* [Search Options](#search-options \"Goto #search-options-\")\n    * [Provider](#provider \"Goto #provider-\")\n    * [Query](#query \"Goto #query-\")\n    * [Category](#category \"Goto #category-\")\n        * [nyaa](#nyaa \"Goto #nyaa-\")\n        * [sukebei](#sukebei \"Goto #sukebei-\")\n    * [SortBy](#sortby \"Goto #sortby-\")\n    * [Filter](#filter \"Goto #filter-\")\n* [TorrentComments](#torrentcomments \"Goto #torrentcomments-\")\n* [TorrentDescription](#torrentdescription \"Goto #torrentdescription-\")\n* [TorrentFiles](#torrentfiles \"Goto #torrentfiles-\")\n\n\n## Search Example\n```Search``` returns \u003ca href=\"https://github.com/irevenko/go-nyaa/blob/27885a8e6b01043672b9c8866fc7ff80c837f060/types/types.go#L3\"\u003e```[]Torrent```\u003c/a\u003e\n\n```go\nimport ( \n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/irevenko/go-nyaa/nyaa\"\n)\n\nfunc main() {\n    opt := nyaa.SearchOptions{\n        Provider: \"nyaa\", // Provider is the only required option\n        Query:    \"LN\",\n        Category: \"literature\",\n        SortBy:   \"seeders\",\n        Filter:   \"trusted-only\",\n    }\n\n    torrents, err := nyaa.Search(opt)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    fmt.Println(torrents)\n}\n```\n\n## Search Options\n```go\ntype SearchOptions struct {\n\tProvider string\n\tQuery    string\n\tCategory string\n\tSortBy   string\n\tFilter   string\n}\n```\n\n## Provider\n- ```nyaa``` - nyaa.si\n- ```sukebei``` - sukebei.nyaa.si\n\n## Query\n- your desired search string\n\n## Category\n### nyaa\n* ```all``` - All Categories\n* ```anime``` - All Anime\n    * ```anime-amv``` \n    * ```anime-eng```\n    * ```anime-non-eng```\n    * ```anime-raw```\n* ```audio``` - All Audio\n    * ```audio-lossless``` \n    * ```audio-lossy```\n* ```literature``` - All Literature\n    * ```literature-eng``` \n    * ```literature-non-eng```\n    * ```literature-raw``` \n* ```live-action``` - All Live Action\n    * ```live-action-idol-prom``` \n    * ```live-action-eng```\n    * ```live-action-non-eng```\n    * ```live-action-raw```\n* ```pictures``` - All Pictures\n    * ```pictures-graphics``` \n    * ```pictures-photos``` \n* ```software``` - All Software\n    * ```software-apps``` \n    * ```software-games```\n\n### sukebei\n* ```all``` - All Categories\n* ```art``` - All Art\n    * ```art-anime``` \n    * ```art-doujinshi```\n    * ```art-manga```\n    * ```art-games```\n    * ```art-pictures```\n* ```real-life``` - All Real Life\n    * ```real-life-photos``` \n    * ```real-life-videos```\n\n## SortBy\n- ```comments```\n- ```downloads``` \n- ```date``` \n- ```seeders``` \n- ```leechers```\n- ```size``` \n\n## Filter\n- ```no-filter```\n- ```no-remakes``` \n- ```trusted-only``` \n\n## TorrentComments\n```TorrentComments``` returns \u003ca href=\"https://github.com/irevenko/go-nyaa/blob/03bee8828c28766b317229ce57ebd0aa9701c37b/types/types.go#L21\"\u003e```[]Comment```\u003c/a\u003e\n\n```go\nimport ( \n\t\"fmt\"\n\t\"log\"\n\t\n\t\"github.com/irevenko/go-nyaa/nyaa\"\n)\n\nfunc main() {\n\tcomms, err := nyaa.TorrentComments(\"https://nyaa.si/view/1366002\") // nyaa.si or sukebei.nyaa.si\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfor _, v := range comms {\n\t\tfmt.Println(\"user: \" + v.User)\n\t\tfmt.Println(\"at: \" + v.Date)\n\t\tfmt.Println(\"text: \" + v.Text)\n\t\tfmt.Println()\n\t}\n}\n```\n\n## TorrentDescription\n```TorrentDescription``` returns ```string```\n\n```go\nimport ( \n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/irevenko/go-nyaa/nyaa\"\n)\n\nfunc main() {\n\tdesc, err := nyaa.TorrentDescription(\"https://nyaa.si/view/1366002\") // nyaa.si or sukebei.nyaa.si\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n   \tfmt.Println(desc)\n}\n```\n\n## TorrentFiles\n```TorrentFiles``` returns ```[]string```\n\n```go\nimport ( \n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/irevenko/go-nyaa/nyaa\"\n)\n\nfunc main() {\n\tfiles, err := nyaa.TorrentFiles(\"https://nyaa.si/view/1366002\") // nyaa.si or sukebei.nyaa.si\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfor _, v := range files {\n\t\tfmt.Println(v)\n\t}\n}\n```\n\n# Notes\n- Pagination does not work with RSS\n- Ascending sort does not work with RSS\n\n# Quick Start 🚀\n```git clone https://github.com/irevenko/go-nyaa.git``` \u003cbr\u003e\n```cd go-nyaa``` \u003cbr\u003e\n```go get -d ./...``` \u003cbr\u003e\n```go run _examples/nyaa_search.go``` \u003cbr\u003e\n\n# What I Learned 🧠\n- RSS Feed, xml\n- Parsing html in Go\n\n# License 📑 \n(c) 2021 Ilya Revenko. [MIT License](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firevenko%2Fgo-nyaa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firevenko%2Fgo-nyaa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firevenko%2Fgo-nyaa/lists"}