nyaa_scraper

package
v0.0.0-...-28a87cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllCategories = NyaaCategory{"All categories", 0, 0}

	Anime                     = NyaaCategory{"All anime", 1, 0}
	AnimeMusicVideo           = NyaaCategory{"Anime music video", 1, 1}
	AnimeEnglishTranslated    = NyaaCategory{"Anime English translated", 1, 2}
	AnimeNonEnglishTranslated = NyaaCategory{"Anime non English translated", 1, 3}
	AnimeRaw                  = NyaaCategory{"Anime raw", 1, 4}

	Audio         = NyaaCategory{"All Audio", 2, 0}
	AudioLossless = NyaaCategory{"Audio lossless", 2, 1}
	AudioLossy    = NyaaCategory{"Audio lossy", 2, 2}

	Literature                     = NyaaCategory{"All literature", 3, 0}
	LiteratureEnglishTranslated    = NyaaCategory{"Literature English translated", 3, 1}
	LiteratureNonEnglishTranslated = NyaaCategory{"Literature non English translated", 3, 2}
	LiteratureRaw                  = NyaaCategory{"Literature raw", 3, 3}

	LiveAction                       = NyaaCategory{"Live action all", 4, 0}
	LiveActionEnglishTranslated      = NyaaCategory{"Live action English translated", 4, 1}
	LiveActionIdolOrPromotionalVideo = NyaaCategory{"Live action idol/promotional video", 4, 2}
	LiveActionNonEnglishTranslated   = NyaaCategory{"Live action non English translated", 4, 3}
	LiveActionRaw                    = NyaaCategory{"Live action raw", 4, 4}

	Pictures         = NyaaCategory{"Pictures all", 5, 0}
	PicturesGraphics = NyaaCategory{"Graphics", 5, 1}
	PicturesPhotos   = NyaaCategory{"Photos", 5, 2}

	Software             = NyaaCategory{"Software all", 6, 0}
	SoftwareApplications = NyaaCategory{"Applications", 6, 1}
	SoftwareGames        = NyaaCategory{"Games", 6, 2}
)
View Source
var (
	NoFilter    = NyaaFilter{"No filter", 0}
	NoRemakes   = NyaaFilter{"No remakes", 1}
	TrustedOnly = NyaaFilter{"Trusted only", 2}
)

Functions

This section is empty.

Types

type NyaaCategory

type NyaaCategory struct {
	Name  string
	Major int
	Minor int
}

func GetNyaaCategory

func GetNyaaCategory(major, minor int) NyaaCategory

func (NyaaCategory) QueryParam

func (category NyaaCategory) QueryParam() string

func (NyaaCategory) String

func (category NyaaCategory) String() string

type NyaaClass

type NyaaClass uint8
const (
	Default NyaaClass = iota
	Trusted
	Danger
)

func ParseNyaaClass

func ParseNyaaClass(str string) NyaaClass

type NyaaEntry

type NyaaEntry struct {
	Category           NyaaCategory
	Class              NyaaClass
	Title              string
	TorrentLink        string
	MagnetLink         string
	Size               string
	DateAdded          time.Time
	Seeders            int
	Leechers           int
	CompletedDownloads int
}

type NyaaFilter

type NyaaFilter struct {
	Name string
	Val  uint8
}

func (NyaaFilter) QueryParam

func (filter NyaaFilter) QueryParam() string

func (NyaaFilter) String

func (filter NyaaFilter) String() string

type NyaaResultPage

type NyaaResultPage struct {
	DisplayedFrom  int
	DisplayedTo    int
	DisplayedOutOf int

	Results []NyaaEntry
}
func Search(query string, category NyaaCategory, filter NyaaFilter) (NyaaResultPage, error)

func SearchSpecificPage

func SearchSpecificPage(query string, category NyaaCategory, filter NyaaFilter, page int) (NyaaResultPage, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL