01 2021 档案

摘要:movie.py import scrapyfrom scrapy.linkextractors import LinkExtractorfrom scrapy.spiders import CrawlSpider, Rulefrom zlsPro.items import ZlsproItemfr 阅读全文
posted @ 2021-01-16 15:36 失忆525 阅读(101) 评论(0) 推荐(0) 编辑
摘要:fenbushi.py import scrapyfrom scrapy.linkextractors import LinkExtractorfrom scrapy.spiders import CrawlSpider, Rulefrom scrapy_redis.spiders import R 阅读全文
posted @ 2021-01-16 15:11 失忆525 阅读(66) 评论(0) 推荐(0) 编辑
摘要:提取符合正则要求的urlimport scrapyfrom scrapy.linkextractors import LinkExtractorfrom scrapy.spiders import CrawlSpider, Ruleclass SunSpider(CrawlSpider): name 阅读全文
posted @ 2021-01-13 21:33 失忆525 阅读(41) 评论(0) 推荐(0) 编辑
摘要:middlewares.py class MiddlewareDownloaderMiddleware: @classmethod def from_crawler(cls, crawler): # This method is used by Scrapy to create your spide 阅读全文
posted @ 2021-01-13 20:57 失忆525 阅读(67) 评论(0) 推荐(0) 编辑
摘要:爬取电影网站 movie.py import scrapyfrom MyProjectDianying.items import MyprojectdianyingItemclass MovieSpider(scrapy.Spider): name = 'movie' # allowed_domai 阅读全文
posted @ 2021-01-13 19:44 失忆525 阅读(193) 评论(0) 推荐(0) 编辑
摘要:window下: 1.先安装well pip install wheel 2.先下载twisted 网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted 3.安装twisted pip install Twisted-20.3.0-cp38-c 阅读全文
posted @ 2021-01-09 21:31 失忆525 阅读(150) 评论(0) 推荐(0) 编辑