爬虫
文章平均质量分 55
lhy857
这个作者很懒,什么都没留下…
展开
-
scrapy_爬虫
命令行下载jar包pip install xxxxxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com使用上面的命令下载wheel、lxml、twisted、pywin32、scrapy五个jar包,xxxxxx内填包名命令行创建项目scrapy startproject yc yc是项目名创建py文件scrapy genspider baidu www.baidu.com baidu是文件名 文件原创 2022-04-03 16:45:23 · 766 阅读 · 0 评论 -
爬虫标题和内容_龙红云
from urllib import requestimport repage=54 #匹配段子吧的第五十四页url="http://tieba.baidu.com/f?kw=%E6%AE%B5%E5%AD%90&ie=utf-8&pn="+str(page)try: #请求头 headers={'User-Agent':'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36.原创 2022-03-20 14:09:54 · 693 阅读 · 0 评论