func GetHTMLInfo(url string) (string, string,error) { url = "http://" + url s, err := goscraper.Scrape(url, 5) if err != nil { fmt.Println(err) } fmt.Println(s) return s.Preview.Icon, s.Preview.Title,err }
For some domains, calling this function can cause s to be nil, err will not detect it.
Test: likexian.com
func GetHTMLInfo(url string) (string, string,error) { url = "http://" + url s, err := goscraper.Scrape(url, 5) if err != nil { fmt.Println(err) } fmt.Println(s) return s.Preview.Icon, s.Preview.Title,err }
For some domains, calling this function can cause s to be nil, err will not detect it. Test: likexian.com