Commit e9a72ff93a8a99a5107bbc6118235cc0f27c15a8

Authored by Peng Xu
1 parent 5867e020
Exists in master

Tune to CentOS

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
crawler/crawler/spiders/ImgCrawler.py
1 -from scrapy.spider import Spider 1 +from scrapy.spider import BaseSpider
2 from scrapy.http import Request 2 from scrapy.http import Request
3 from crawler.items import CrawlerItem 3 from crawler.items import CrawlerItem
4 import re 4 import re
5 5
6 -class Crawler(Spider): 6 +class Crawler(BaseSpider):
7 name = 'img' 7 name = 'img'
8 allowed_domains = ['www.cs.tsinghua.edu.cn'] 8 allowed_domains = ['www.cs.tsinghua.edu.cn']
9 start_urls = ['http://www.cs.tsinghua.edu.cn'] 9 start_urls = ['http://www.cs.tsinghua.edu.cn']