Skip to content

[HELP]多进程调用下各子进程进度的显示 #12

Answered by RikaCelery
xueli12 asked this question in Q&A
Discussion options

You must be logged in to vote

import json
import string
import subprocess
import sys

command = ['N_m3u8DL-RE', 'https://f43.frontgross.com/hl/ta_miau/2024-01-03,06-51/index.m3u8?md5=2j-Va4Jg9bwxAM9sA9LYZg&expires=1707062670&origin=110&mid=9fcba76f-d852-4e58-83a2-ffb8e653682e&akey=6c9c01ce-07af-45c2-afb3-b60cf0017bcb&p=6002&request_id=', '-H', 'User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', '--force-ansi-console', '--download-retry-count', '99', '--thread-count', '8']

# run the command and capture the output in real time
last_line = ""
progress_info = ""
with subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=1, universal_newlines=True

Replies: 21 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by RikaCelery
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@RikaCelery
Comment options

Comment options

You must be logged in to vote
4 replies
@RikaCelery
Comment options

@Ephemeralwanning
Comment options

@RikaCelery
Comment options

@Ephemeralwanning
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
3 participants
Converted from issue

This discussion was converted from issue #3 on March 11, 2024 11:58.