Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98621

Re: Using subprocess to capture a progress line

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Using subprocess to capture a progress line
Date 2015-11-11 10:28 +1100
Message-ID <mailman.227.1447198109.16136.python-list@python.org> (permalink)
References <20151110224756.GA1944@mail.akwebsoft.com>

Show all headers | View raw


On Wed, Nov 11, 2015 at 9:47 AM, Tim Johnson <tim@akwebsoft.com> wrote:
> I've written a command-line "wrapper" for youtube-dl, executing
> youtube-dl as a subprocess.
>
> ------------------------------------------------------------------
> youtube-dl reports download progress on one line. I.E. the line is
> overwritten numerous times with no carriage return until the
> downloading is finished.
> ------------------------------------------------------------------
>

Sounds to me like a possible buffering problem. But since youtube-dl
is implemented in Python, you might find it easier to "pip install
youtube_dl" and work with the methods directly:

>>> import youtube_dl
>>> youtube_dl.YoutubeDL().download(["m39ydsOPSww"])

Should be possible to manipulate around the outside of that.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Using subprocess to capture a progress line Chris Angelico <rosuav@gmail.com> - 2015-11-11 10:28 +1100

csiph-web