Closed deter3 closed 8 years ago
Compare Session#source
and Session#body
. The letter is probably what you want.
Thanks a lot for the prompt reply . You are right , session#body is the one I am looking for .
The strangest thing is webkit_server and PhantomJS might has different xpath class from firefox and chrome for same elements .
running the code below :
search_term = 'tokyo skytree' sess = dryscrape.Session(base_url = 'https://www.google.co.jp') sess.set_attribute('auto_load_images', True) sess.visit('/') q = sess.at_xpath('//*[@name="q"]') q.set(search_term) q.form().submit()
print sess.source()
There is a google right knowledge panel in the rendered png file (see below ) , but can not find in the session source file .
How can I fix it ? Thanks a lot
Richard