torrenttrader

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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 (usite *Site) DownloadTorrent(torrentUrl string) (content []byte, filename string, id string, err error)

func (*Site) DownloadTorrentById

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

func (*Site) GetAllTorrents

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

func (*Site) GetDefaultHttpHeaders

func (usite *Site) GetDefaultHttpHeaders() [][]string

func (*Site) GetLatestTorrents

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

func (*Site) GetName

func (usite *Site) GetName() string

func (*Site) GetSiteConfig

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

func (*Site) GetStatus

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

func (*Site) PurgeCache

func (usite *Site) PurgeCache()

func (*Site) SearchTorrents

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

Jump to

Keyboard shortcuts

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