From b689a4013b103b418a965010c075ba5552b77cc5 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 1 Aug 2013 12:16:20 +0200 Subject: [PATCH] update geo tools --- tools/geo/py/geo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/geo/py/geo.py b/tools/geo/py/geo.py index 033f0a9c..ea7bb091 100644 --- a/tools/geo/py/geo.py +++ b/tools/geo/py/geo.py @@ -38,6 +38,8 @@ def encode_wikipedia_id(id): return id.replace(' ', '_').encode('utf8') def get_countries(): + def exclude(country): + return country['name'] in ['Federation of Bosnia and Herzegovina', 'Republika Srpska'] def exists(country): for c in countries: if c['name'] == country['name']: @@ -74,7 +76,7 @@ def get_countries(): # List of sovereign states html = read_wikipedia_url('List of sovereign states') matches = re.compile('>