摘要: 登录人人网的一个小例子: 1 # -*- coding: utf-8 -*- 2 import scrapy 3 import re 4 5 class RenrenSpider(scrapy.Spider): 6 name = 'renren' 7 allowed_domains = ['renr 阅读全文
posted @ 2020-05-03 17:44 牛公的跑奔 阅读(781) 评论(0) 推荐(0) 编辑
摘要: CrawlSpider继承于Spider类,除了继承过来的属性外(name、allow_domains),还提供了新的属性和方法: rules 在rules中包含一个或多个Rule对象,每个Rule对爬取网站的动作定义了特定操作。如果多个rule匹配了相同的链接,则根据规则在本集合中被定义的顺序,第 阅读全文
posted @ 2020-05-03 17:00 牛公的跑奔 阅读(291) 评论(0) 推荐(0) 编辑
总访问量:AmazingCounters.com