码迷,mamicode.com
首页 >  
搜索关键字:bdr    ( 399个结果
使用Selenium模拟浏览器抓取淘宝商品美食信息
1.搜索关键词:利用Selenium驱动浏览器,得到商品列表。 2.分析页码并翻页:得到商品页码数,模拟翻页,得到后续页面的商品列表。 3.分析提取商品内容:利用PyQuery分析源码,解析得到商品列表。 4.存储到MongoDB:将商品列表信息存储到数据库MongoDB。 可以利用PhantomJ ...
分类:其他好文   时间:2018-06-01 01:00:13    阅读次数:202
【Python】unittest-5
#练习9: import unittest from selenium import webdriver import time class GloryRoad(unittest.TestCase): def setUp(self): # 启动Firefox浏览器 self.driver = web... ...
分类:编程语言   时间:2018-05-31 02:39:24    阅读次数:220
模拟登录QQ空间
# coding=utf-8from selenium import webdriver# 模拟登录QQ空间def Start_Login(): # 这个是chormedriver的地址 driver = webdriver.Chrome(executable_path='K:\\python-wo ...
分类:其他好文   时间:2018-05-30 00:19:04    阅读次数:1173
python爬虫基础案例之糗事百科
关于爬虫也是刚接触,案例是基于python3做的, 依靠selenium的webdriver做的,所以python3必须有selenium这个包, 如果是基于谷歌浏览器的话需要下载谷歌浏览器的驱动,放在python的目录下,在此之前记得把环境变量安装好 直接上代码 ...
分类:编程语言   时间:2018-05-22 19:48:42    阅读次数:172
1111
做UI自动化时会遇到服务环境不稳定、网络环境不稳定,访问一个页面要加载好久都没出来,导致页面还没有打开就报错了,这时用到等待等待有三种方式:普通人用time等待(最不可取)聪明人用隐式等待 driver.implicitly_wait()# 隐式等待是针对整个项目的,driver生成的时候写一遍就行 ...
分类:其他好文   时间:2018-05-22 18:34:21    阅读次数:140
mac虚拟机搭建atx环境
尽量升级Xcode到最新版,保持iPhone的版本大于9.3 1、安装webDriverAgent到ios真机 从github上下载代码:git clone https://github.com/facebook/WebDriverAgent bundle identifier:com.fdzq.F ...
分类:系统相关   时间:2018-05-21 16:06:08    阅读次数:317
cannot focus element解决方案
If you enconter error "cannot focus element" when using Selenium+Python in Chrome to input value, you can use below code instead: from selenium.webdri ...
分类:其他好文   时间:2018-05-21 16:04:52    阅读次数:1180
Selenium chrome配置不加载图片
from selenium import webdriver chrome_options = webdriver.ChromeOptions() prefs = {"profile.managed_default_content_settings.images":2} chrome_options... ...
分类:其他好文   时间:2018-05-18 15:36:42    阅读次数:433
ubuntu服务器无法运行chromedriver解决方法(转)
sudo apt-get install Xvfb sudo pip install pyvirtualdisplay from pyvirtualdisplay import Display display = Display(visible=0, size=(1024, 768)) displa... ...
分类:系统相关   时间:2018-05-12 00:00:56    阅读次数:368
【bugRecord1】driver=webdriver.firefox() TypeError: 'module' object is not callable
1 #coding=utf-8 2 from selenium import webdriver 3 driver=webdriver.firefox() 解决方法:firefox改为Firefox ...
分类:Web程序   时间:2018-05-09 00:02:54    阅读次数:965
399条   上一页 1 ... 20 21 22 23 24 ... 40 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!