[~] Refactor
This commit is contained in:
parent
4d2e9a3fd7
commit
5db573c025
@ -204,7 +204,6 @@ def tiktok_videos_fetch(
|
||||
error=0,
|
||||
)
|
||||
|
||||
with multiprocessing.Pool(processes=1) as pool:
|
||||
for o in tqdm.tqdm(meta):
|
||||
stats['total'] += 1
|
||||
path = os.path.join(
|
||||
@ -218,17 +217,14 @@ def tiktok_videos_fetch(
|
||||
force
|
||||
):
|
||||
try:
|
||||
pool.apply(
|
||||
tiktok_video_fetch,
|
||||
kwds=dict(
|
||||
tiktok_video_fetch.apply_async(
|
||||
id=o['id'],
|
||||
url=o['url'],
|
||||
fname=o['fname'],
|
||||
method=method,
|
||||
method_str=method_str,
|
||||
result_dir=o['result_dir'],
|
||||
),
|
||||
)
|
||||
).wait()
|
||||
stats['saved'] += 1
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user