V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  dedura  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2017-05-03 15:38:04 +08:00
回复了 snowsie 创建的主题 Python Python 爬虫问题请教各位
>>> driver.get("http://stockpage.10jqka.com.cn/HQ_v3.html#hs_000791")
>>> driver.find_element_by_xpath("//li[@period='daily']").click()

然后要先移动到曲线上才能出现这个 ma 信息

from selenium.webdriver.common.action_chains import ActionChains

a=driver.find_element_by_xpath('//*[@id="canvasPanel"]')

ActionChains(driver).move_to_element(a).perform()

driver.find_element_by_xpath('//*[@id="kTipma"]').text
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5566 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 06:23 · PVG 14:23 · LAX 23:23 · JFK 02:23
Developed with CodeLauncher
♥ Do have faith in what you're doing.