我使用Ghost.py.But模拟点击按钮,无法弄清楚如何获得点击按钮后加载的内容。
from ghost import Ghost
ghost = Ghost(wait_timeout=40)
page, extra_resources = ghost.open("http://www.samsung.com/in/consumer/mobile-phone/mobile-phone/viewall")
#ghost.wait_page_loaded()
n=2;
print type(ghost.click("input#txtViewAll"))下一步该怎么做才能获得动态加载的内容?
PS:已在google.Could中查找但未得到答案
提前感谢
发布于 2013-01-29 20:11:13
我认为这应该是答案:
page, resources = ghost.evaluate(
"document.getElementById('txtViewAll').click();", expect_loading=True)致以敬意,
https://stackoverflow.com/questions/14582186
复制相似问题