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


Groups > comp.lang.python > #98621 > unrolled thread

Re: Using subprocess to capture a progress line

Started byChris Angelico <rosuav@gmail.com>
First post2015-11-11 10:28 +1100
Last post2015-11-11 10:28 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#98621 — Re: Using subprocess to capture a progress line

FromChris Angelico <rosuav@gmail.com>
Date2015-11-11 10:28 +1100
SubjectRe: Using subprocess to capture a progress line
Message-ID<mailman.227.1447198109.16136.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web