You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, the webpage I want to crawl, because it is a node dynamically generated by js. So I try to use Geziyor to get the content I want, and I have two questions.
First, I used the official example to get the attribute value of the src of the video tag, and it was still unable to print out the attribute value (code is below).
Second, whether the content dynamically generated by js can open multiple requests like getting a static page.
package main
import (
"fmt""github.com/geziyor/geziyor""github.com/geziyor/geziyor/client"
)
funcmain() {
geziyor.NewGeziyor(&geziyor.Options{
// set UserAgentUserAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
//StartRequestsFunc: func(g*geziyor.Geziyor) {
g.GetRendered("https://m.douyu.com/100", g.Opt.ParseFunc)
},
// Handle responseParseFunc: func(g*geziyor.Geziyor, r*client.Response) {
ifsrc, ok:=r.HTMLDoc.Find("#html5player-video").Attr("src"); ok {
fmt.Println("src is:", src)
}
},
}).Start()
}
The text was updated successfully, but these errors were encountered:
Hello, the webpage I want to crawl, because it is a node dynamically generated by js. So I try to use Geziyor to get the content I want, and I have two questions.
First, I used the official example to get the attribute value of the src of the video tag, and it was still unable to print out the attribute value (code is below).
Second, whether the content dynamically generated by js can open multiple requests like getting a static page.
The text was updated successfully, but these errors were encountered: