[問題] 請教ghost.py抓取javascript後
hi
謝謝版上許多高手幫忙
但有些問題還是想請教一下
我的code如下
from ghost import Ghost
referer_url = "http://www.w3schools.com/js/tryit.asp?filename=tryjs_comments5"
gh = Ghost(wait_timeout=100000)
page,resources = gh.open(referer_url)
result,resources=gh.evaluate("document.getElementById(\"myP\")")
print result
上面那個URL是個教javascript的網頁,我拿來測試ghost.py
抓完後,result的確是有東西,但是我怎麼印出它的值呢?
謝謝
--
生命是個過程
可悲的是它不能重來
可喜的是它也不需要重來
~~~童夢奇緣~~~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.127.191.91
推
06/20 21:33, , 1F
06/20 21:33, 1F
→
06/20 21:48, , 2F
06/20 21:48, 2F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):