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

added absolute path to reading sources.cfg

RTB d657f942 9542262b

+5 -2
+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