例如我们先要爬取当当网书籍类--青春文学--爱情情感的前100页书籍的图片,名字,价格
1.创建一个scrapy文件
主页内容有scrapy的创建及使用方法可以进去查看
2.查看当当网对图书数据进行分析
通过对网页数据的检查来获取到网页的url的地址以及通过xpath获取图片,书籍名称,价格
3.在items.py中定义出你要爬取图片,价格,书籍名称
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
class ScrapyDangdang095Item(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
# 通俗的说就是你要下载的数据都有什么
# 图片