Web scraping 为什么显示“DNS查找失败”?

Web scraping 为什么显示“DNS查找失败”?,web-scraping,scrapy,Web Scraping,Scrapy,这是我的密码。我正在使用scrapy basic spider模板,并且我得到DNS查找失败错误。我的错在哪里 class TopmoviesSpider(scrapy.Spider): name = 'topmovies' allowed_domains = ['www.imdb.com'] start_urls = ['https://https://www.imdb.com/chart/top/'] def parse(self, response)

这是我的密码。我正在使用scrapy basic spider模板,并且我得到DNS查找失败错误。我的错在哪里

class TopmoviesSpider(scrapy.Spider):
    name = 'topmovies'
    allowed_domains = ['www.imdb.com']
    start_urls = ['https://https://www.imdb.com/chart/top/']



     def parse(self, response):
            movies = response.xpath("//td[@class='titleColumn']/a")
            for movie in movies:
                link = movie.xpath(".//@href").get()
                yield response.follow(url=link, callback=self.scrape_movie)


        def scrape_movie(self,response):

            rating = response.xpath("//span[@itemprop='ratingValue']/text()").get()
            for mov in response.xpath("//div[@class='title_wrapper']"):
                yield {
                    'title': mov.xpath(".//h1/text()").get(),
                    'year_of_release': mov.xpath(".//span/a/text()").get(),
                    'duration': mov.xpath(".//div[@class='subtext']/time/text()").get(),
                    'genre': mov.xpath(".//div[@class='subtext']/a/text()").get(),
                    'date_of_release': mov.xpath("//div[@class='subtext']/a[2]/text()"),
                    'rating': rating
                }

检查起始URL。您提供的url无效。如果您试图爬网imdb,请检查post

阅读“开始URL”类属性: