Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
download
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
download
Commits
efdc578e
Commit
efdc578e
authored
Oct 28, 2022
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
491faab3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
download.py
download.py
+9
-9
No files found.
download.py
View file @
efdc578e
...
...
@@ -93,9 +93,9 @@ class DownFile:
if
len
(
item
[
'voice_file'
])
>
0
:
self
.
local
.
local_file
=
self
.
save_path
+
item
[
'voice_file'
]
if
self
.
check_file
(
self
.
local
.
local_file
):
self
.
lock
.
acquire
()
self
.
old_num
=
self
.
old_num
+
1
self
.
lock
.
release
()
#
self.lock.acquire()
#
self.old_num = self.old_num + 1
#
self.lock.release()
continue
self
.
local
.
time_array
=
time
.
strptime
(
item
[
'call_time'
],
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
...
...
@@ -148,21 +148,21 @@ class DownFile:
continue
if
self
.
check_file
(
self
.
local
.
local_file
):
self
.
lock
.
acquire
()
self
.
old_num
=
self
.
old_num
+
1
self
.
lock
.
release
()
#
self.lock.acquire()
#
self.old_num = self.old_num + 1
#
self.lock.release()
continue
self
.
check_dir
(
self
.
save_path
+
self
.
local
.
local_dir
)
self
.
local
.
result
=
request
.
urlretrieve
(
self
.
local
.
url
,
self
.
local
.
local_file
)
self
.
lock
.
acquire
()
self
.
download_num
=
self
.
download_num
+
1
#
self.lock.acquire()
#
self.download_num = self.download_num + 1
# self.log('url', self.local.url)
# self.log('download_file', self.local.result)
# self.log("download_num", self.download_num)
# self.log("old_num", self.old_num)
self
.
lock
.
release
()
#
self.lock.release()
def
download_remote
(
self
,
data
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment