* Use urllib in spacy.en.download

This commit is contained in:
Matthew Honnibal 2015-06-07 23:51:38 +02:00
parent 514d6b8e22
commit 7e9e8f654a

View File

@ -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]