fix. google result div rules change

This commit is contained in:
SXueckShen 2021-08-12 11:27:06 +08:00 committed by GitHub
parent 53daeb7575
commit 851e204f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,7 +313,7 @@ func Search(ctx context.Context, searchTerm string, opts ...SearchOptions) ([]Re
linkText := strings.TrimSpace(linkHref)
titleText := strings.TrimSpace(sel.Find("div > div > a > h3").Text())
descText := strings.TrimSpace(sel.Find("div > div > div > span > span").Text())
descText := strings.TrimSpace(sel.Find("div > div > div > span").Text())
if linkText != "" && linkText != "#" {
result := Result{