Home > other >  Scrapy framework
Scrapy framework

Time:01-28

Why scrapy. Spiders and def parse (self, response) signature does not match?

The import scrapy
The from mypro. Items import MyproItem

The class WeisuenSpider (scrapy. Spiders) :
Name='weisuen'
Allowed_domains=[' sina.com.cn ']
Start_urls=(' http://tech.sina.com.cn/d/s/2016-09-17/doc-ifxvyqwa3324638.shtml ')

Def parse (self, response) :
The item=MyproItem ()
Item. The title=the response. Xpath ("/HTML/head/title/text () ")
Print (item. The title)
And the book online code, just can not output the, no response data
  • Related