Reputation: 420
I am trying to use dryscrape to scrape a web page, but is possible to save a particular image from page? It is a normal <img> tag.
Upvotes: 0
Views: 237
Reputation: 1
Yes you can download image with Dryscrape like that
img_url = sess.xpath("//img")[0]['href']
sess.visit(img_url)
sess.render("image.png")
Try this
Upvotes: 0
Reputation: 12969
From looking at the documentation at https://dryscrape.readthedocs.io/, it does not look like dryscrape supports downloading files. You will have to use a module such as Requests to do this.
Upvotes: 0