From 672c8cdcfb78db189deead02533fd1cfe1faecfb Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 3 Mar 2021 16:25:19 +0100 Subject: at.py: skip abbr if null --- scrapers/at.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scrapers') diff --git a/scrapers/at.py b/scrapers/at.py index 54b2402..d07f8f6 100755 --- a/scrapers/at.py +++ b/scrapers/at.py @@ -44,11 +44,13 @@ for page in pages: continue if info['Typ'].startswith('Vertrag -'): continue - normen[info['Gesetzesnummer']] = dict( + data = dict( title=info['Kurztitel'], url=info['GesamteRechtsvorschriftUrl'], - abbr=info.get('Abkuerzung') ) + if 'Abkuerzung' in info: + data['abbr'] = info['Abkuerzung'] + normen[info['Gesetzesnummer']] = data with open('laws/at.json', 'w') as f: json.dump(list(normen.values()), f, indent=2, ensure_ascii=False) -- cgit v1.2.3