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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to