Commit f982ecfe by Nicolas Joyard


parent b358c89d
Showing with 3 additions and 2 deletions
......@@ -30,14 +30,15 @@ def fetch_an(job, **kwargs):
raise Exception('Téléchargement %s impossible' % url)
def match_link(a):
return a['href'].endswith('')
return a['href'].endswith('') or \
a['href'].endswith(' ')
link = [a for a in'a[href]') if match_link(a)][0]
except Exception:
raise Exception('Lien vers dump introuvable')
jsonzip_url = link['href']
jsonzip_url = link['href'].replace(' ', '')
if jsonzip_url.startswith('/'):
jsonzip_url = '%s%s' % (BASE_URL, jsonzip_url)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment