This commit is contained in:
2023-02-28 18:41:14 +08:00
parent d851984402
commit ffae737ee4
2 changed files with 7 additions and 3 deletions

Binary file not shown.

View File

@ -27,9 +27,13 @@ def filtervideo():
videoid = dicdata['id']
videopath = os.sep.join(['data', videoid+'.mp4'])
barcode = dicdata['barcode']
urllib.request.urlretrieve(videourl, videopath, _progress)
for _ in range(15):
try:
time.sleep(2)
urllib.request.urlretrieve(videourl, videopath, _progress)
break
except Exception as e:
continue
flag = get_object_location(videopath)
results.append({'id':videoid, 'result':flag})
os.remove(videopath)