Commit 9d27526e authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

Add function for make company in CB spider

parent 8bdee0a5
......@@ -20,6 +20,8 @@ class CompanyMaker:
self._make_list_for_tc()
elif media == 'aitop':
self._make_list_for_aitop()
elif media == 'cb':
self._make_list_for_cb()
def get_companies(self):
return self.companies
......@@ -48,4 +50,11 @@ class CompanyMaker:
for i in self.in_site:
self.companies.append(Company(i.id, 'https://aitopics.org/search?view=&filters=&sort=score+desc&q=' + i.name,
129, 2, 2, i.name))
def _make_list_for_cb(self):
for i in self.in_site:
name = i.name.replace(' ', '-').replace('.', '-')
self.companies.append(Company(i.id, 'http://www.crunchbase.com/organization/{}/press/'.format(name),
None, 2, 2, i.name))
\ No newline at end of file
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