File tree Expand file tree Collapse file tree
PBBB_acces_fibre_france/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
12import urllib .request
23import os
34
5+ from pathlib import Path
6+
47urls = ['https://www.data.gouv.fr/fr/datasets/r/d538685a-b9cb-4a3e-b90d-ad6f0a13920b' ,
58 'https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements-version-simplifiee.geojson' ,
69 'https://www.arcep.fr/fileadmin/reprise/dossiers/fibre/liste-gestion-identifiants-prefixe-ligne-fibre-2.xlsx' ]
710
8- dossier_data = "./PBBB_acces_fibre_france/data/"
911paths = ['2021t4-obs-hd-thd-deploiement.xlsx' ,
1012 'departements.geojson' ,
1113 'operator-id.xlsx' ]
1214
1315if __name__ == "__main__" :
14- if not os .path .isdir (dossier_data ):
15- os .mkdir (dossier_data )
16-
1716 for i in range (len (paths )):
1817 path , url = paths [i ], urls [i ]
19- if not os .path .isfile (dossier_data + path ):
18+ if not os .path .isfile (path ):
2019 print (f"Téléchargement { path } depuis { url } ." )
21- urllib .request .urlretrieve (url , dossier_data + path )
20+ urllib .request .urlretrieve (url , path )
You can’t perform that action at this time.
0 commit comments