Python 3.x Scrapy.selector不导入HtmlXPathSelector

Python 3.x Scrapy.selector不导入HtmlXPathSelector,python-3.x,join,scrapy,Python 3.x,Join,Scrapy,我在课文第2部分写错了什么 不知何故,Scrapy.selector没有被寻址 系统要求我写更多,因为我已经发布了很多代码#为了实现完整性 from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from scrapy.selector import HtmlXPathSelector class SpiderSpider(CrawlSpider): nam

我在课文第2部分写错了什么

不知何故,Scrapy.selector没有被寻址

系统要求我写更多,因为我已经发布了很多代码#为了实现完整性

from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from scrapy.selector import HtmlXPathSelector

class SpiderSpider(CrawlSpider):
    name = 'spider'
    allowed_domains = ['www.tagesschau.de']
    start_urls = ['http://www.tagesschau.de/']
    base_url = ['http://www.tagesschau.de/']

    rules = (Rule(LinkExtractor(allow=('investigativ'), deny=('magnifier'),), callback='parse_article', follow=True),)

    def parse_article(self, response):
        complete_article = response.xpath('//div[@class="storywrapper"]')

        for article in complete_article:
            dachzeile = article.xpath('.//div[@class="meldungHead"]/h1/span[@class="dachzeile"]/text()').get()
            headline = article.xpath('.//div[@class="meldungHead"]/h1/span[@class="headline"]/text()').get()
            date = article.xpath('//meta[@name="date"]/@content').get()
            datum = date.split("T")[0]
            uhrzeit = date.split("T")[1]
            ueberschrift = article.xpath('.//div[@class="mod modA modParagraph"]/p/strong/text()').get()
            #text = article.xpath('//div[@class="storywrapper"]//p[@class="text small"]/text()').get()
            text_2 = "".join([s.strip().encode('utf-8') for s in response.selector.xpath('//div[@class="storywrapper"]//p[@class="text small"]/text()').extract()])
            #relative_image = article.xpath('//div[@class="media mediaA"]/img/@src').get()
            #final_image = self.base_url + relative_image
            url = response.url.encode('utf-8')

            yield {
                'Überschrift': dachzeile,
                'Titel': headline,
                'Datum': datum,
                'Uhrzeit': uhrzeit,
                'Einleitung': ueberschrift,
                #'Text': text,
                'Text 2': text_2,
                #'Bild': final_image,
                'Link': url,
            }

您使用的是哪一版本的scrapy?scrapy版本:2.0.1仅使用选择器HtmlXPathSelector在scrapy 2.0.1中不可用/不推荐使用