ERROR: Error while obtaining start requests - Scrapy

When I run the code below, I get these errors : http://pastebin.com/AJqRxCpM My settings: http://pastebin.com/9nzaXLJs

This is my code:

import scrapy

import requests
from scrapy.http import Request

import scrapy
from FinalSpider.items import Page  # Defined in items.py

URL = "http://url.com/PopUp.aspx?IDCoupon=%d"
starting_number = 60000
number_of_pages = 80

class FinalSpider(scrapy.Spider):
    name = "FinalSpider"
    allowed_domains = ['url.com']
    start_urls = [URL % starting_number]

    def __init__(self):
        self.page_number = starting_number

    def start_requests(self):
        for i in range (self.page_number, number_of_pages, -1):
            yield request(url = URL % i, callback=self.parse)

    def parse(self, response):
        filename = response.url.split("/")[-2] + '.html'
        with open(filename, 'wb') as f:
            f.write(response.body)

Answers


It's resolved. Just add this:

start_urls = ['url.com/=%d' %(n)
              for n in range(0, 20)] * MEANS from 0 to 20

Need Your Help

How to get JavaScript to rotate through a series if images

javascript css html5

I'm having an issues where I cannot get my code to rotate multiple images in a cycle for my image gallery (just a bunch of images i got on google). I can however to get 1 image to cycle through the