Commit 68630e42 authored by hujun's avatar hujun

url

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