tangled
alpha
login
or
join now
dekker.one
/
Fourmi
0
fork
atom
A web scraper build to search specific information for a given compound (and its pseudonyms)
0
fork
atom
overview
issues
pulls
pipelines
added absolute path to reading sources.cfg
RTB
11 years ago
d657f942
9542262b
+5
-2
1 changed file
expand all
collapse all
unified
split
utils
configurator.py
+5
-2
utils/configurator.py
···
1
1
import ConfigParser
2
2
3
3
from scrapy.utils.project import get_project_settings
4
4
-
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
69
+
current_dir = os.path.dirname(os.path.abspath(__file__))
70
70
+
config_path = current_dir + '\..\sources.cfg'
71
71
+
# [TODO]: location of sources.cfg should be softcoded eventually
69
72
config = ConfigParser.ConfigParser()
70
70
-
config.read('sources.cfg') # [TODO]: should be softcoded eventually
73
73
+
config.read(config_path)
71
74
return config
72
75
73
76
@staticmethod