看板 Python 關於我們 聯絡資訊
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
st900278:我沒記錯的話 那回傳值好像是qstring 要轉一下型別 06/20 21:33
areyo:對,因為我print result後,就出現PyQt4 .....和一個位址 06/20 21:48