Documentation ¶
Index ¶
- Variables
- func CheckNetWorkFromURL(url string) bool
- func CollectData(s []Scraping, keyword string) map[string]string
- func CollectDataEx(s []ScrapingEx, keyword string) map[string][]string
- func GetResponseFromURL(url string) (resp *http.Response, ok bool)
- func PrintData(data map[string]string)
- func PrintDataEx(data map[string][]string)
- func RemoveNonAscII(s string) string
- func URLJoin(baseURL string, relURL string) string
- type Scraping
- type ScrapingEx
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TorrentURL = map[string]string{ "ttobogo": "https://ttobogo.net", "torrentmobile": "https://torrentmobile19.com", "torrentview": "https://torrentview39.com", "tshare": "https://tshare.org", "nyaa": "https://nyaa.si", "sukebe": "https://sukebei.nyaa.si", "torrentsir": "https://torrentsir50.com", "torrentj": "https://torrentj54.com", "torrentsee": "https://torrentsee81.com", "jujutorrent": "https://torrentjuju.com", "torrenttoast": "https://tttt10.net", "torrentqq": "https://torrentqq133.com", "torrentwiz": "https://torrentwiz27.me", "torrentgram": "https://torrentgram29.com", "torrentsome": "https://torrentsome24.com", "ktxtorrent": "https://ktxtorrent37.com", "torrentrj": "https://torrentrj35.com", } UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36" )
variable for scraping
Functions ¶
func CheckNetWorkFromURL ¶
CheckNetWorkFromURL function checks network status
func CollectData ¶
CollectData function executes web scraping based on each scrapper
func CollectDataEx ¶ added in v0.3.0
func CollectDataEx(s []ScrapingEx, keyword string) map[string][]string
CollectDataEx function executes web scraping based on each scrapper
func GetResponseFromURL ¶
GetResponseFromURL returns *http.Response from url
func PrintDataEx ¶ added in v0.3.0
PrintDataEx function prints scraped data to console
func RemoveNonAscII ¶ added in v0.3.0
RemoveNonAscII remove non-ASCII characters
Types ¶
type Scraping ¶
Scraping interface is for web scraping
func GetAvailableSites ¶
GetAvailableSites function gets available torrent sites
type ScrapingEx ¶ added in v0.3.0
ScrapingEx interface is for web scraping
func GetAvailableSitesEx ¶ added in v0.3.0
func GetAvailableSitesEx(oldItems []ScrapingEx) []ScrapingEx
GetAvailableSitesEx function gets available torrent sites
Click to show internal directories.
Click to hide internal directories.