You can use the Page.GetResource
method to get files from here:
Such as get an image:
bin, _ := page.GetResource("https://test.com/a.png")
fmt.Println(bin)
You can also use the Element.Resource
method to get the file of the src
attribute.
Such as for element <img src="a.jpg">
, you can use code like this to get the a.jpg
:
bin := page.MustElement("img").MustResource()
fmt.Println(bin)