mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
* Use urllib in spacy.en.download
This commit is contained in:
parent
514d6b8e22
commit
7e9e8f654a
|
@ -3,8 +3,8 @@ from os import path
|
|||
import os
|
||||
import tarfile
|
||||
import shutil
|
||||
import wget
|
||||
import plac
|
||||
import urllib
|
||||
|
||||
# TODO: Read this from the same source as the setup
|
||||
VERSION = '0.8.5'
|
||||
|
@ -21,6 +21,7 @@ SPEECH_DATA_DIR_URL = '%s/en_data_speech-%s.tgz' % (AWS_STORE, VERSION)
|
|||
DEST_DIR = path.join(path.dirname(__file__), 'data')
|
||||
|
||||
def download_file(url, out):
|
||||
urllib.urlretrieve(url, filename=out)
|
||||
wget.download(url, out=out)
|
||||
return url.rsplit('/', 1)[1]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user