Commit 68630e42 authored by hujun's avatar hujun

url

parent 0c9009ae
......@@ -75,6 +75,14 @@ class DownFile:
time.sleep(10)
count_sleep = 0
if len(item['voice_file']) > 0:
local_file = self.save_path + item['voice_file']
string_end = item['voice_file'].find('/')
local_dir = item['voice_file'][0: string_end]
if self.check_file(local_file):
old_num = old_num + 1
continue
try:
count_sleep = count_sleep + 1 # 增加暂停计数
url = self.ali_yun_sdk(item['call_time'], item['call_id'])
......@@ -97,11 +105,8 @@ class DownFile:
if url == '':
continue
if len(item['voice_file']) > 0:
local_file = self.save_path + item['voice_file']
string_end = item['voice_file'].find('/')
local_dir = item['voice_file'][0: string_end]
else:
#当数据库未有记录
if item['voice_file'] == '':
string_end = url.find("?")
file_url = url[0:string_end]
......
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 to comment