爬虫
文章平均质量分 62
爬虫学习
qq_45693271
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
4多线程,多进程,线程池
这里写目录标题多线程多进程线程池多线程from threading import Thread#method1:def func(): for i in range(10000): print("func:",i)if __name__ == '__main__': t = Thread(target=func) t.start() for i in range(10000): print("main原创 2021-11-29 20:53:05 · 357 阅读 · 0 评论 -
5 selenium,下拉列表(select),验证码
seleniumselenium的简单操作爬取[拉钩招聘](https://lagou.com)的简单信息1爬取[拉钩招聘](https://lagou.com)的简单信息2无头浏览器及下拉列表获取[艺恩](https://www.endata.com.cn/BoxOffice/BO/Year/index.html)历年排行榜通过工具[超级鹰](https://www.chaojiying.com/)来进行验证码的处理chaojiying.py超级鹰干掉超级鹰网站检测到使用自动化工具打开解决方法登录[中国铁原创 2021-11-28 21:22:21 · 679 阅读 · 0 评论 -
3 cookie、防盗链
这里写目录标题cookiecookie##获取17k小说网书架中的内容登录 -> 获得cookie带着cookie请求书架的url -> 获得书架上的内容使用session进行请求 -> session认为这是一连串的操作,在此过程中cookie不会丢失import requestssession = requests.session()data ={ "loginName":"13219308276", "password":"xcsrs0711"}原创 2021-11-23 21:00:43 · 2769 阅读 · 0 评论 -
2从html中提取相关数据
从html中提取相关数据正则表达式基础re模块的使用findallfinditersearchmatchcompile获取[豆瓣TOP250](https://movie.douban.com/top250?start=0&filter=)指定内容获取[电影天堂](https://dytt89.com/)指定内容Bs4正则表达式基础re模块的使用findallimport re#匹配字符串中的内容,并以列表的形式返回,若不加符号“+”,则在列表中返回的是单个的字符,否则列表中返回的是字原创 2021-11-20 14:16:33 · 1683 阅读 · 0 评论 -
1爬虫基础预备
爬虫(web、http、request)请求任一网址请求任一网址from urllib.request import urlopenurl = "http://www.baidu.com" #应为http而不是httpsresp = urlopen(url)with open("jfdhj.html",mode="w",encoding="utf-8") as f: f.write(resp.read().decode("utf-8")) #decode按照指定的格式解码字符串原创 2021-11-06 10:28:51 · 130 阅读 · 0 评论
分享