nexusphp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SELECTOR_TORRENT       = `a[href^="download.php?"],a[href^="download?"]`
	SELECTOR_DOWNLOAD_LINK = `a[href^="download.php?"],a[href^="download?"]`
	SELECTOR_DETAILS_LINK  = `a[href^="details.php?"],a[href^="details_"]`
)

Variables

This section is empty.

Functions

func NewSite

func NewSite(name string, siteConfig *config.SiteConfigStruct, config *config.ConfigStruct) (site.Site, error)

Types

type Site

type Site struct {
	Name       string
	Location   *time.Location
	SiteConfig *config.SiteConfigStruct
	Config     *config.ConfigStruct
	HttpClient *http.Client
	// contains filtered or unexported fields
}

func (*Site) DownloadTorrent

func (npclient *Site) DownloadTorrent(url string) ([]byte, string, error)

func (*Site) DownloadTorrentById

func (npclient *Site) DownloadTorrentById(id string) ([]byte, string, error)

func (*Site) GetAllTorrents

func (npclient *Site) GetAllTorrents(sort string, desc bool, pageMarker string, baseUrl string) (torrents []site.Torrent, nextPageMarker string, err error)

func (*Site) GetLatestTorrents

func (npclient *Site) GetLatestTorrents(full bool) ([]site.Torrent, error)

func (*Site) GetName

func (npclient *Site) GetName() string

func (*Site) GetSiteConfig

func (npclient *Site) GetSiteConfig() *config.SiteConfigStruct

func (*Site) GetStatus

func (npclient *Site) GetStatus() (*site.Status, error)

func (*Site) PurgeCache

func (npclient *Site) PurgeCache()

func (*Site) SearchTorrents

func (npclient *Site) SearchTorrents(keyword string, baseUrl string) ([]site.Torrent, error)

type TorrentsParserOption

type TorrentsParserOption struct {
	SelectorTorrentSeeders    string
	SelectorTorrentLeechers   string
	SelectorTorrentSnatched   string
	SelectorTorrentSize       string
	SelectorTorrentProcessBar string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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