Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 498 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 498 Bytes

Page Resources

You can use the Page.GetResource method to get files from here:

page-resources

Such as get an image:

bin, _ := page.GetResource("https://test.com/a.png")
fmt.Println(bin)

Element resource

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)