from crawlers.members_parliament_crawler import *
|
|
|
|
from wikidata.wd_PEP import *
|
|
|
|
config = "crawlers/config.yaml"
|
|
list_of_countries = ["nicaragua"]
|
|
|
|
|
|
# doing the crawling of government websites
|
|
|
|
# crawler = members_parliament_crawler(config)
|
|
|
|
# crawler.download_member_list_pages_of_countries(list_of_countries)
|
|
|
|
# crawler.parse_member_list_data2dictionary(list_of_countries)
|
|
|
|
# crawler.download_member_data_htmls(list_of_countries)
|
|
|
|
# crawler.parse_member_data2dictionary(list_of_countries)
|
|
|
|
# processing the resulted dictionary and create wikidata queries
|
|
|
|
wikidata_PEP = Wikidata_PEP(config)
|
|
|
|
# wikidata_PEP.importMembers_of_parliament_dict(list_of_countries)
|
|
|
|
# wikidata_PEP.check_for_entity_ids(list_of_countries)
|
|
|
|
# wikidata_PEP.create_member_on_wikidata()
|
|
|
|
wikidata_PEP.edit_member_on_wikidata("Q116918332")
|