04 2017 档案
摘要:因为MySQLdb不支持python3,需要导入pymysql 可以选择pip 安装pymysql,或者pycharm安装 [File] >> [settings] >> [Project: python] >> [Project Interpreter] >> "+"
阅读全文
摘要:首先安装 测试抓取baidu,其中的chromedriver.exe需要自己下载,百度有很多的 执行结果如下 进阶 如果遇到错误 原因是没有安装chrome driver,到 https://sites.google.com/a/chromium.org/chromedriver/downloads
阅读全文
摘要:github: https://github.com/haibincoder/ToutiaoCrawler 1.浏览器中找到内容的接口,Network --> XHR是动态加载的,如果没有内容的话刷新当前页面,我们这里可以看到data节点下面有需要的数据。 2.找到需要的内容和url 3.返回结果
阅读全文
摘要:下载地址是:https://pypi.python.org/pypi/pip#downloads : 下载完成之后,解压到一个文件夹,用CMD控制台进入解压目录,输入: 添加环境变量,在PATH最后添加: 完整安装好了pip: 最后安装request就很方便了: 在python中import:
阅读全文
摘要:(1)<? super String> is any class which is a superclass of String (including String itself). (In this case, the only other suitable class is Object.) 即
阅读全文