|
|
|
|
import os
|
|
|
|
import yaml
|
|
import json
|
|
|
|
|
|
|
|
class WikidataPEP(object):
|
|
|
|
def __init__(self, configFile):
|
|
|
|
with open(configFile, "r") as stream:
|
|
try:
|
|
self.config = yaml.safe_load(stream)
|
|
except yaml.YAMLError as exc:
|
|
print(exc)
|
|
|
|
|
|
def importMembersOfParliamentDict(self, listOfCountries):
|
|
|
|
self.fullDictionaryMemberLists = {}
|
|
|
|
for country in listOfCountries:
|
|
|
|
print('started to parse data of member of ' + country + ' ..')
|
|
|
|
f = open('crawlers/output/' + country +'MemberList.txt')
|
|
text = f.read()
|
|
|
|
self.fullDictionaryMemberLists[country] = eval(text)
|
|
|
|
print(self.fullDictionaryMemberLists)
|
|
|
|
|
|
|