thousandlemons / English-words-pronunciation-mp3-audio-download

Download the pronunciation mp3 audio for 119,376 unique English words/terms
Apache License 2.0
178 stars 52 forks source link

issue with ultimate.json #4

Open rezadevelop opened 6 years ago

rezadevelop commented 6 years ago

i try to use ultimate.json rather than data.json

DATA_FILE = 'ultimate.json'

but there is an issue with url

`class DownloadWorker(Thread):

'pairs' is a dictionary

def __init__(self, pk, pairs, dir_path, statistics):
    Thread.__init__(self)
    self.pk = pk
    self.pairs = pairs
    self.dir_path = dir_path
    self.statistics = statistics

def run(self):
    for word, url in self.pairs.items():
        # if os.path.exists(os.path.join(self.dir_path, word + MP3_FILENAME_EXTENSION)):
        #     self.statistics.decrease_total()
        #     continue

        current = self.statistics.increase_current()
        print('(' + str(current) + '/' + str(self.statistics.total) + ') ' + word)
        download_mp3(word, url, self.dir_path)`

in last line url is ['http://img2.tfd.com/pron/mp3/en/US/d3/d3djdysfd7dydssfhfdosssls3sdsksls3gjgy.m p3', 'http://www.yourdictionary.com/audio/a/af/african-american.mp3', 'http://im g2.tfd.com/pron/mp3/en/UK/d3/d3djdysfd7dydssfhfdosssls3sdsksls3gjgy.mp3'] that seems it is not compatible with 'download_mp3' module

should i change something else? or the code needs some change?

Warm regards,

thousandlemons commented 6 years ago

Hi! Thank you for your interests in this project. Can you send me an email at nathanielove@gmail.com and let's discuss about this further?