···11+[DEFAULT]
22+reliability = Unknown
33+44+#For each source listed in FourmiCrawler/sources there should be a section
55+#named exactly as the filename in here. If not present, the DEFAULT value is
66+#used for reliability of that source.
77+88+[ChemSpider]
99+reliability = High
1010+#token=Paste ChemSpider API token here and remove the hashtag
1111+1212+[NIST]
1313+reliability = High
1414+1515+[WikipediaParser]
1616+reliability = Medium
1717+1818+[PubChem]
1919+reliability = High
+5-2
utils/configurator.py
···11import ConfigParser
2233from scrapy.utils.project import get_project_settings
44-44+import os
5566class Configurator:
77 """
···6666 variables for sources
6767 :return a ConfigParser object of sources.cfg
6868 """
6969+ current_dir = os.path.dirname(os.path.abspath(__file__))
7070+ config_path = current_dir + '\..\sources.cfg'
7171+ # [TODO]: location of sources.cfg should be softcoded eventually
6972 config = ConfigParser.ConfigParser()
7070- config.read('sources.cfg') # [TODO]: should be softcoded eventually
7373+ config.read(config_path)
7174 return config
72757376 @staticmethod