Commit 6a402ed1 authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

Make request for all selected company

parent 9d27526e
...@@ -10,7 +10,15 @@ from ..items import ExaItem ...@@ -10,7 +10,15 @@ from ..items import ExaItem
class CbSpider(BaseSpider): class CbSpider(BaseSpider):
name = "cb" name = "cb"
allowed_domains = ["www.crunchbase.com"] allowed_domains = ["www.crunchbase.com"]
start_urls = ['http://www.crunchbase.com/organization/sense-ly/press/'] # start_urls = ['http://www.crunchbase.com/organization/sense-ly/press/']
def start_requests(self):
for i in self.companies(self.name):
print(i)
try:
yield scrapy.Request(i.url, callback=self.parse, meta={'company': i, 'post_id': 0})
except:
pass
def parse(self, response): def parse(self, response):
rows = response.xpath("//table/tr")[1:] rows = response.xpath("//table/tr")[1:]
......
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