scrapy是可以从本地读取数据的:

    1. # -*- coding: utf-8 -*-
    2. import scrapy
    3. class VideosfromfileSpider(scrapy.Spider):
    4. name = 'txt'
    5. allowed_domains = ["file://D:/videos.txt"]
    6. start_urls = [
    7. 'file://D:/videos.txt',
    8. ]
    9. def parse(self, response):
    10. print("=========================")
    11. print(response.body)
    12. print("=========================")

    注意到这里使用了file开头的协议。