Documentation ¶
Index ¶
- Constants
- func NewSite(name string, siteConfig *config.SiteConfigStruct, config *config.ConfigStruct) (site.Site, error)
- type Site
- func (npclient *Site) DownloadTorrent(torrentUrl string) ([]byte, string, error)
- func (npclient *Site) DownloadTorrentById(id string) ([]byte, string, error)
- func (npclient *Site) GetAllTorrents(sort string, desc bool, pageMarker string, baseUrl string) (torrents []site.Torrent, nextPageMarker string, err error)
- func (npclient *Site) GetLatestTorrents(full bool) ([]site.Torrent, error)
- func (npclient *Site) GetName() string
- func (npclient *Site) GetSiteConfig() *config.SiteConfigStruct
- func (npclient *Site) GetStatus() (*site.Status, error)
- func (npclient *Site) PurgeCache()
- func (npclient *Site) SearchTorrents(keyword string, baseUrl string) ([]site.Torrent, error)
- type TorrentsParserOption
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_"]` SELECTOR_TORRENTS_LIST_DEFAULT = `table.torrents > tbody` )
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 (*Site) DownloadTorrentById ¶
func (*Site) GetAllTorrents ¶
func (*Site) GetLatestTorrents ¶
func (*Site) GetSiteConfig ¶
func (npclient *Site) GetSiteConfig() *config.SiteConfigStruct
func (*Site) PurgeCache ¶
func (npclient *Site) PurgeCache()
type TorrentsParserOption ¶
type TorrentsParserOption struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.