Python库beautifulsoup的安装与使用
http://www.lfd.uci.edu/~gohlke/pythonlibs/找到相应的库,解压后把bs4目录复制到Python安装目录下的lib目录下。参考:http://cuiqingcai.com/1319.html#coding:utf-8from bs4 import BeautifulSouphtml = ...soup = BeautifulSoup …… 阅读全文
http://www.lfd.uci.edu/~gohlke/pythonlibs/找到相应的库,解压后把bs4目录复制到Python安装目录下的lib目录下。参考:http://cuiqingcai.com/1319.html#coding:utf-8from bs4 import BeautifulSouphtml = ...soup = BeautifulSoup …… 阅读全文
下载:https://pypi.python.org/pypi/selenium#downloads浏览器驱动:https://sites.google.com/a/chromium.org/chromedriver/downloadshttp://chromedriver.storage.googleapis.com/index.html?path=2.21/ …… 阅读全文
selenium用以制作自动化测试工具还是非常不错的,这里演示一个打开谷歌浏览器并输入一个关键词,最后提交搜索的示例脚本。安装selenium见《Python库selenium的安装与使用》。# coding:utf-8import starfrom selenium import webdriverfrom selenium.webdriver.c …… 阅读全文
1、安装pipinstallpyspiderWindows下安装需要注意的问题:http://docs.pyspider.org/en/latest/Frequently-Asked-Questions/2、启动pyspider all3、后台配置http://localhost:5000/点击cr …… 阅读全文
首先pyspider all启动pyspider的所有服务,然后访问http://localhost:5000创建一个爬虫任务:taonvlang,点开任务链接编辑http://localhost:5000/debug/taonvlang,默认模板:右侧为代码编辑区,可以在crawl_config里做一些配置,具体可以参考官网API文档:http://docs.pyspider.org/e …… 阅读全文
[E 160329 11:32:22 base_handler:194] HTTP 599: SSL certificate problem: self signed certificate in certificate chain Traceback (most recent call last): File "D:\Python27\lib\site-packages …… 阅读全文