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


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

python-based downloader (youtube-dl) missing critical feature ...

Started bylbrt chx _ gemale
First post2011-11-04 11:48 +0000
Last post2011-11-04 13:45 +0100
Articles 5 — 5 participants

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


Contents

  python-based downloader (youtube-dl) missing critical feature ... lbrt chx _ gemale - 2011-11-04 11:48 +0000
    Re: python-based downloader (youtube-dl) missing critical feature ... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-04 12:32 +0000
      Re: python-based downloader (youtube-dl) missing critical feature ... Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-11-04 14:31 +0100
      RE: python-based downloader (youtube-dl) missing critical feature ... "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2011-11-07 16:34 -0500
    Re: python-based downloader (youtube-dl) missing critical feature ... Philipp Hagemeister <phihag@phihag.de> - 2011-11-04 13:45 +0100

#15337 — python-based downloader (youtube-dl) missing critical feature ...

Fromlbrt chx _ gemale
Date2011-11-04 11:48 +0000
Subjectpython-based downloader (youtube-dl) missing critical feature ...
Message-ID<1320407282.243739@nntp.aceinnovative.com>
 python-based youtube-dl
~ 
 http://rg3.github.com/youtube-dl/
~ 
 is sorely missing a flag in order to indicate the maximum file length of the data feed it would download (well, unless, for some reason, it is considered a "feature").
~ 
 I wonder what developers were thinking about when they came up this nice piece of code. If you actually look in the code
~ 
...
 data = urllib2.urlopen(basic_request)
 content_length = data.info()['Content-Length']
...
~ 
 you will see they get the content length of the actual data feed and they also print the progress status based on the content length
~ 
 Implementing an if statement a la:
~ 
 max_indicated_content_length = self.params.get('max_content_length', None);
~ 
 if( content_length > max_indicated_content_length ){ [do not download, just report "data feed too large"] }
 else{ [do] }
~ 
 shouldn't be hard at all
~ 
 youtube-dl is under the Creative Commons License copyrighted by 2006-2011 Ricardo Garcia Gonzalez and maintained by him and a group of python developers
~ 
 They are the ones keeping a mental map of that project. It would be a plus if they implement this feature, but anyother python developer can implemented (please, let me know if/when you do)
~ 
 lbrtchx

[toc] | [next] | [standalone]


#15340

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2011-11-04 12:32 +0000
Message-ID<4eb3db48$0$29968$c3e8da3$5496439d@news.astraweb.com>
In reply to#15337
On Fri, 04 Nov 2011 11:48:02 +0000, lbrt chx _ gemale wrote:

> python-based youtube-dl
> ~
>  http://rg3.github.com/youtube-dl/
> ~
>  is sorely missing a flag in order to indicate the maximum file length
>  of the data feed it would download (well, unless, for some reason, it
>  is considered a "feature").

If you are making a feature request, you should make it directly to the 
project developer, and not here.

Since you consider that feature "shouldn't be hard at all" (your words), 
perhaps you should consider providing a patch? Don't forget the 
documentation and tests for it.

Or did you mean "it shouldn't be hard for me, if somebody else does the 
work"?


> ~
>  I wonder what developers were thinking about when they came up this
>  nice piece of code. If you actually look in the code
[...]

Lbrtchx, it's possible that English is not your natural language. Please 
be aware that, in English, "what they were thinking..." is often used 
sarcastically, as in "they weren't actually thinking". Particularly 
following your use of scare quotes around "feature".

(Even more so for the similar form, "what were they thinking?".)

It's probably not going to help you get a feature added to the project if 
you imply (even by accident) that lack of that feature is an indication 
that the developer wasn't thinking.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#15344

FromJean-Michel Pichavant <jeanmichel@sequans.com>
Date2011-11-04 14:31 +0100
Message-ID<mailman.2433.1320413505.27778.python-list@python.org>
In reply to#15340
Steven D'Aprano wrote:
> On Fri, 04 Nov 2011 11:48:02 +0000, lbrt chx _ gemale wrote:
>
>   
>> python-based youtube-dl
>> ~
>>  http://rg3.github.com/youtube-dl/
>> ~
>>  is sorely missing a flag in order to indicate the maximum file length
>>  of the data feed it would download (well, unless, for some reason, it
>>  is considered a "feature").
>>     
>
> If you are making a feature request, you should make it directly to the 
> project developer, and not here.
>
> Since you consider that feature "shouldn't be hard at all" (your words), 
> perhaps you should consider providing a patch? Don't forget the 
> documentation and tests for it.
>
> Or did you mean "it shouldn't be hard for me, if somebody else does the 
> work"?
>
>
>   
>> ~
>>  I wonder what developers were thinking about when they came up this
>>  nice piece of code. If you actually look in the code
>>     
> [...]
>
> Lbrtchx, it's possible that English is not your natural language. Please 
> be aware that, in English, "what they were thinking..." is often used 
> sarcastically, as in "they weren't actually thinking". Particularly 
> following your use of scare quotes around "feature".
>
> (Even more so for the similar form, "what were they thinking?".)
>
> It's probably not going to help you get a feature added to the project if 
> you imply (even by accident) that lack of that feature is an indication 
> that the developer wasn't thinking.
>
>
>   
Maybe Lbrtchx is one of the Sheldon Cooper's nicknames :o)

JM

PS : I have the feeling that my nerdy reference will fall flat...

[toc] | [prev] | [next] | [standalone]


#15439

From"Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Date2011-11-07 16:34 -0500
Message-ID<mailman.2516.1320701920.27778.python-list@python.org>
In reply to#15340
>Maybe Lbrtchx is one of the Sheldon Cooper's nicknames :o)
>
>JM
>
>PS : I have the feeling that my nerdy reference will fall flat...

Not completely ;)

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

[toc] | [prev] | [next] | [standalone]


#15343

FromPhilipp Hagemeister <phihag@phihag.de>
Date2011-11-04 13:45 +0100
Message-ID<mailman.2432.1320412148.27778.python-list@python.org>
In reply to#15337
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

As already said, you should file your request at
https://github.com/rg3/youtube-dl/issue , not here.

A few things to note:

* Not all sites necessarily send the Content-Length header.
* RTMP URLs would have to be treated differently
* Sending a Range header might allow for a better implementation.

Why do you want to restrict the filesize of the download in the first
place? I can't see a use case, but that doesn't mean there isn't one.

Due to me not having lots of time at the moment, your best chance to get
any youtube-dl feature implemented is providing a patch (in form of a
github pull-request, if possible).

- -- Philipp (youtube-dl developer)

lbrt@mail.python.org wrote:
>  python-based youtube-dl
> ~ 
>  http://rg3.github.com/youtube-dl/
> ~ 
>  is sorely missing a flag in order to indicate the maximum file length of the data feed it would download (well, unless, for some reason, it is considered a "feature").
> ~ 
>  I wonder what developers were thinking about when they came up this nice piece of code. If you actually look in the code
> ~ 
> ...
>  data = urllib2.urlopen(basic_request)
>  content_length = data.info()['Content-Length']
> ...
> ~ 
>  you will see they get the content length of the actual data feed and they also print the progress status based on the content length
> ~ 
>  Implementing an if statement a la:
> ~ 
>  max_indicated_content_length = self.params.get('max_content_length', None);
> ~ 
>  if( content_length > max_indicated_content_length ){ [do not download, just report "data feed too large"] }
>  else{ [do] }
> ~ 
>  shouldn't be hard at all
> ~ 
>  youtube-dl is under the Creative Commons License copyrighted by 2006-2011 Ricardo Garcia Gonzalez and maintained by him and a group of python developers
> ~ 
>  They are the ones keeping a mental map of that project. It would be a plus if they implement this feature, but anyother python developer can implemented (please, let me know if/when you do)
> ~ 
>  lbrtchx

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEAREKAAYFAk6z3mMACgkQ9eq1gvr7CFyr1wCgpqf8xuORDC4LBVY8WFmtAufG
k+AAoIX+mXa7SGLULP2M67IQ34sBgk1o
=duyH
-----END PGP SIGNATURE-----

[toc] | [prev] | [standalone]


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


csiph-web