0
When I run my spider scrapy
returns me the following error:
Valueerror: Missing Scheme in request url h
import scrapy
class QuotesSpider(scrapy.Spider):
name = "Mineracao"
def start_requests(self):
link = "http://www.jornalpanorama.com.br/site/data-policia.php?page="
y=1
for x in range(240):
urls=link+str(y)
y=y+1
print urls
for url in start_urls:
yield scrapy.Request(url=url, callback=self.parse)
def parse(self, response):
url = "http://www.jornalpanorama.com.br/site/"
for x in response.xpath("//*[contains(@class, 'listar-noticias-titulo')]/a/@href").extract():
print url + x
Where the variable is defined
start_urls
? You are using, but it has not been defined anywhere in the code. And it has the variableurls
that you iterate on and then don’t use. They should be the same thing?– Woss