Python爬虫
NewBee.Mu
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
scrapy框架新建项目
scrapy startproject module cd module scrapy genspider baidu baidu.com原创 2020-04-07 10:37:22 · 204 阅读 · 0 评论 -
python中用js新建标签页
js='window.open("https://www.sogou.com");' driver.execute_script(js)原创 2020-04-03 10:11:41 · 320 阅读 · 0 评论 -
【python+selenium】移除readonly属性
a=self.driver.find_element_by_xpath('//*[@id="start"]') self.driver.execute_script('arguments[0].removeAttribute(\"readonly\")', a)转载 2020-03-26 11:29:47 · 1408 阅读 · 0 评论 -
Python爬虫:Selenium鼠标点击二级菜单
selenium包中ActionChains类给出的示例如下: menu = driver.find_element_by_css_selector(".nav") hidden_submenu = driver.find_element_by_css_selector(".nav #submenu1") actions = ActionChains(driver) actions.move_t...转载 2020-03-25 17:55:54 · 1228 阅读 · 0 评论 -
python中运行js语句
self.driver.execute_script(js)原创 2020-03-25 12:48:45 · 425 阅读 · 0 评论 -
python爬虫中切换标签页
handles = self.driver.window_handles self.driver.switch_to.window(handles[1]) self.driver.close() self.driver.switch_to.window(handles[0])原创 2020-03-25 12:45:47 · 798 阅读 · 0 评论 -
Python中进入frame和退出
self.driver.switch_to.frame("frame的name") time.sleep(1) self.driver.switch_to.default_content() time.sleep(1)原创 2020-03-23 13:00:16 · 2423 阅读 · 0 评论 -
Python爬虫中点掉弹窗
Python爬虫项目中遇到有弹窗要点掉,可以用以下的代码 alt=self.driver.switch_to_alert() alt.accept()原创 2020-03-23 09:54:21 · 1074 阅读 · 0 评论
分享