def load_verbaende(): loader = Loader(grano, source_url=SOURCE_URL) orgs = read_json('data/verbaende.json') for org in orgs: try: load_verband(loader, org) except Exception as e: log.error('Failed loading with %s at %s', e, org)
def load_angaben(): loader = Loader(grano, source_url=SOURCE_URL) bt = loader.make_entity(['public_body']) bt.set('name', '17. Deutscher Bundestag') bt.save() angaben = read_json('data/angaben.json') for angabe in angaben.get('results'): load_angabe(loader, angabe, bt)