V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  dedura  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2017 年 5 月 3 日
回复了 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
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3721 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 9ms · UTC 04:42 · PVG 12:42 · LAX 21:42 · JFK 00:42
♥ Do have faith in what you're doing.