rsssite

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RssConfigDict map[string][]RssConfig
)

Functions

func GetFeed

func GetFeed(url string) *gofeed.Feed

func GetMagnetsFromText

func GetMagnetsFromText(textFile string) ([]string, error)

func HasPrefix added in v0.1.3

func HasPrefix(str string, prefixArr []string) bool

func ReadRssConfigDict

func ReadRssConfigDict() *map[string][]RssConfig

func SetRssJsonPath

func SetRssJsonPath(p string)

Types

type Acgnx added in v0.1.4

type Acgnx struct {
}

func (*Acgnx) GetMagnet added in v0.1.4

func (a *Acgnx) GetMagnet(item *gofeed.Item) string

func (*Acgnx) GetMagnetItem added in v0.1.4

func (a *Acgnx) GetMagnetItem(item *gofeed.Item) MagnetItem

type Dmhy

type Dmhy struct {
}

func (*Dmhy) GetMagnet

func (d *Dmhy) GetMagnet(item *gofeed.Item) string

func (*Dmhy) GetMagnetItem

func (d *Dmhy) GetMagnetItem(item *gofeed.Item) MagnetItem

type MagnetItem

type MagnetItem struct {
	Title       string `json:"title"`
	Link        string `json:"link"`
	Magnet      string `json:"magnet"`
	Description string `json:"description"`
	Content     string `json:"content"`
}

func GetMagnetItemList

func GetMagnetItemList(config *RssConfig) []MagnetItem

type MagnetSite

type MagnetSite interface {
	GetMagnet(item *gofeed.Item) string
	GetMagnetItem(item *gofeed.Item) MagnetItem
}

type Mikanani

type Mikanani struct{}

func (*Mikanani) GetMagnet

func (m *Mikanani) GetMagnet(item *gofeed.Item) string

func (*Mikanani) GetMagnetItem

func (m *Mikanani) GetMagnetItem(item *gofeed.Item) MagnetItem

type Nyaa

type Nyaa struct {
}

func (*Nyaa) GetMagnet

func (n *Nyaa) GetMagnet(item *gofeed.Item) string

func (*Nyaa) GetMagnetItem

func (n *Nyaa) GetMagnetItem(item *gofeed.Item) MagnetItem

type RssConfig

type RssConfig struct {
	Name       string `json:"name"`
	Url        string `json:"url"`
	Cid        string `json:"cid,omitempty"`
	Filter     string `json:"filter,omitempty"`
	Expiration uint   `json:"expiration,omitempty"`
}

func GetRssConfigByURL

func GetRssConfigByURL(url string) *RssConfig

Jump to

Keyboard shortcuts

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