A web scraper build to search specific information for a given compound (and its pseudonyms)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'hotfix/spider-import-error'

+13 -10
+1 -1
Fourmi.py
··· 7 7 from twisted.internet import reactor 8 8 from scrapy.crawler import Crawler 9 9 from scrapy import log, signals 10 - from FourmiCrawler.spiders.Fourmispider import FourmiSpider 10 + from FourmiCrawler.spider import FourmiSpider 11 11 from scrapy.utils.project import get_project_settings 12 12 13 13
+12 -9
FourmiCrawler/spider.py
··· 2 2 3 3 4 4 class FourmiSpider(Spider): 5 - name = "FourmiSpider" 5 + name = "FourmiSpider" 6 + 7 + def __init__(self, compound=None, *args, **kwargs): 8 + super(FourmiSpider, self).__init__(*args, **kwargs) 9 + self.synonyms = [compound] 10 + 6 11 7 - def __init__(self, compound=None, *args, **kwargs): 8 - super(FourmiSpider, self).__init__(*args, **kwargs) 12 + def parse(self, reponse): 13 + # [TODO] - This function should delegate it's functionality to other 14 + # parsers. 15 + pass 9 16 10 - def parse(self, reponse): 11 - # [TODO] - This function should delegate it's functionality to other 12 - # parsers. 13 - pass 14 17 15 - def add_parser(self, parser): 16 - self.parsers.add(parser) 18 + def add_parser(self, parser): 19 + self.parsers.add(parser)