Scrapy爬虫基础
第1关:Scarpy安装与项目创建
pip install scrapy
cd /root
scrapy startproject HelloWorld
cd HelloWorld
scrapy genspider world www.baidu.com
第2关:Scrapy核心原理
# -*- coding: utf-8 -*-
import scrapy
class WorldSpider(scrapy.Spider):
name = 'world'
allowed_domains