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

Merge branch 'feature/sourcescfg_fixes' into develop

+24 -2
+19
sources.cfg.sample
··· 1 + [DEFAULT] 2 + reliability = Unknown 3 + 4 + #For each source listed in FourmiCrawler/sources there should be a section 5 + #named exactly as the filename in here. If not present, the DEFAULT value is 6 + #used for reliability of that source. 7 + 8 + [ChemSpider] 9 + reliability = High 10 + #token=Paste ChemSpider API token here and remove the hashtag 11 + 12 + [NIST] 13 + reliability = High 14 + 15 + [WikipediaParser] 16 + reliability = Medium 17 + 18 + [PubChem] 19 + reliability = High
+5 -2
utils/configurator.py
··· 1 1 import ConfigParser 2 2 3 3 from scrapy.utils.project import get_project_settings 4 - 4 + import os 5 5 6 6 class Configurator: 7 7 """ ··· 66 66 variables for sources 67 67 :return a ConfigParser object of sources.cfg 68 68 """ 69 + current_dir = os.path.dirname(os.path.abspath(__file__)) 70 + config_path = current_dir + '\..\sources.cfg' 71 + # [TODO]: location of sources.cfg should be softcoded eventually 69 72 config = ConfigParser.ConfigParser() 70 - config.read('sources.cfg') # [TODO]: should be softcoded eventually 73 + config.read(config_path) 71 74 return config 72 75 73 76 @staticmethod