![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
MaxineZhou
Don't forget try again
展开
-
正则表达式 re.findall 用法、元素定位方式Xpath总结、python操作json和csv(转)
1.正则 re.findall 的简单用法https://www.cnblogs.com/xieshengsen/p/6727064.html2.xpath定位总结https://blog.csdn.net/hou_angela/article/details/803058283.python操作json和csvhttps://www.cnblogs.com/onefine/p...转载 2020-04-15 16:38:46 · 3387 阅读 · 0 评论 -
urllib
一、url详解: scheme:访问的协议,一般为http或https host:主机名,域名,比如www.baidu.com port:端口号,当你访问一个网站的时候,浏览器默认使用80端口 path:查找路径,比如https://mp.csdn.net/console/editor/html,后面的console/editor/html就是path ...原创 2020-05-14 21:31:48 · 310 阅读 · 0 评论 -
Scrapy安装时Protego报超时错误
重新试了很多次安装Protego,总是报错,而且没找到wheel文件解决方法:设定一个长一些的超时设定,如下pip install scrapy --default-timeout=10000再试一次,就可以安装了...原创 2020-02-20 21:40:05 · 1058 阅读 · 0 评论 -
正则表达式
1.什么是正则表达式?2.正则表达式的函数3.match、search函数,返回match对象match函数是从头开始匹配的,所以第二个字符串可以匹配到数字research函数的属性4.贪婪匹配Re库默认使用贪婪匹配方式:即输出匹配最长的子串...原创 2020-02-19 21:07:17 · 119 阅读 · 0 评论 -
爬取大学排名
程序的结构设计: -一、从网络上获取大学排名网页内容二、提取网页内容中信息到合适的数据结构希望提取的结果是列表的形式,所以选择二维列表三、利用数据结构展示并输出结果import requestsfrom bs4 import BeautifulSoupimport bs4def getHTMLText(url): try: ...原创 2020-02-20 14:24:54 · 468 阅读 · 0 评论