When I run my spider, the scrapy
returns 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