5
I am using the following code to render a web page:
import dryscrape
# set up a web scraping session
sess = dryscrape.Session(base_url = 'http://www.google.com')
# we don't need images
sess.set_attribute('auto_load_images', True)
# visit
sess.visit("/")
sess.render("google.png")
But, I would like to render only a part of the page, for example on the google site, I would like to render only the Doodle(<div id=dood class=cta>
)
I tried to replace the last line by:
sess.at_css('.cta').render("google.png")
But this is not allowed. Does anyone know any way?