CNKI-selenium-crawler icon indicating copy to clipboard operation
CNKI-selenium-crawler copied to clipboard

hxd,get html()这个函数报错啊

Open tlovegod opened this issue 2 years ago • 3 comments

tlovegod avatar Apr 10 '22 06:04 tlovegod

def get_html(number,count_number): """火狐模拟并获得当前源码 第一个是网址self.url,第二个是基金号,需要导入基金号列表 """ """火狐模拟并获得当前源码 第一个是基金号,第二个是计数器 """ s_2='/html/body/div[4]/div/div[2]/div[1]/input[1]' s_1='//*[@id="txt_SearchText"]' if count_number==0: element=driver.find_element_by_xpath('/html/body/div[2]/div[2]/div/div[1]/div/div[1]/span')#鼠标悬浮

tlovegod avatar Apr 10 '22 06:04 tlovegod

这个xpath有误

tlovegod avatar Apr 10 '22 06:04 tlovegod

网页结构在变,这个时间长了,需要自己重新修改下。不过大部分还是没问题的

stay-leave avatar Apr 10 '22 06:04 stay-leave