Documentation ¶
Overview ¶
Package ygg searches and downloads torrents from Ygg Torrent
No check is done here regarding the user input. This check should be achieved by the caller. Parsing is achieved thanks to the GoQuery library. Comments common to all scraping libs are already done in the arc package which is very similar to this package. Only additional comments specific to this lib are present here.
Torrent search is achieved by Lookup(). Input is a search string. Output is a slice of maps made up of the following keys:
- DescURL: the torrent description page
- Name: the torrent name
- Size: the size of the file to be downloaded
- UplDate: the date of upload
- Leechers: the number of leechers (set to -1 if cannot be converted to integer)
- Seechers: the number of seechers (set to -1 if cannot be converted to integer)
Magnet file extraction are achieved by ExtractMag(). Input is the url of the torrent page. Output is the magnet link.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAndDlFile ¶
func FindAndDlFile(descURL string, in string, userID string, userPass string, timeout time.Duration, client *http.Client) (string, error)
FindAndDlFile authenticates user, opens the torrent description page, and downloads the torrent file. Returns the local path of downloaded torrent file. A user timeout is set.