Documentation
¶
Index ¶
- Constants
- func NewSite(name string, siteConfig *config.SiteConfigStruct, config *config.ConfigStruct) (site.Site, error)
- type Site
- func (usite *Site) DownloadTorrent(torrentUrl string) (content []byte, filename string, id string, err error)
- func (usite *Site) DownloadTorrentById(id string) ([]byte, string, error)
- func (usite *Site) GetAllTorrents(sort string, desc bool, pageMarker string, baseUrl string) (torrents []*site.Torrent, nextPageMarker string, err error)
- func (usite *Site) GetDefaultHttpHeaders() [][]string
- func (usite *Site) GetLatestTorrents(full bool) ([]*site.Torrent, error)
- func (usite *Site) GetName() string
- func (usite *Site) GetSiteConfig() *config.SiteConfigStruct
- func (usite *Site) GetStatus() (*site.Status, error)
- func (usite *Site) PublishTorrent(contents []byte, metadata url.Values) (id string, err error)
- func (usite *Site) PurgeCache()
- func (usite *Site) SearchTorrents(keyword string, baseUrl string) ([]*site.Torrent, error)
Constants ¶
View Source
const ( SELECTOR_USERNAME = `.myBlock:has(a[href$="account.php"]) .myBlock-caption` SELECTOR_USER_UPLOADED = `.myBlock:has(a[href$="account.php"]) tr:has(td:contains("Uploaded")) td:last-child` SELECTOR_USER_DOWNLOADED = `.myBlock:has(a[href$="account.php"]) tr:has(td:contains("Downloaded")) td:last-child` )
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 *azuretls.Session HttpHeaders [][]string }
func (*Site) DownloadTorrent ¶
func (*Site) DownloadTorrentById ¶
func (*Site) GetAllTorrents ¶
func (*Site) GetDefaultHttpHeaders ¶
func (*Site) GetLatestTorrents ¶
func (*Site) GetSiteConfig ¶
func (usite *Site) GetSiteConfig() *config.SiteConfigStruct
func (*Site) PublishTorrent ¶ added in v0.1.10
PublishTorrent implements site.Site.
func (*Site) PurgeCache ¶
func (usite *Site) PurgeCache()
Click to show internal directories.
Click to hide internal directories.