Commit 375d9f2a authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

crawlers

parent 89e23bab
...@@ -101,8 +101,8 @@ class QuotesSpider(scrapy.Spider): ...@@ -101,8 +101,8 @@ class QuotesSpider(scrapy.Spider):
# self.stop = True # self.stop = True
# else: # else:
link_list = response.xpath('//*[@class="two_third post_header"]/h5/a/@href').extract() link_list = response.xpath('//*[@class="two_third post_header"]/h5/a/@href').extract()
if len(link_list) <= 0: link_list.extend(response.xpath('//*[@class="post_header_title two_third last"]/h5/a/@href').extract())
link_list = response.xpath('//*[@class="post_header_title two_third last"]/h5/a/@href').extract() link_list.extend(response.xpath('//*[@class="post_header_title one"]/h5/a/@href').extract())
for link in link_list: for link in link_list:
yield scrapy.Request(url=link, callback=self.parse_item) yield scrapy.Request(url=link, callback=self.parse_item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment