Giter VIP home page Giter VIP logo

youtube-dl's People

Contributors

atomicdryad avatar dineshs91 avatar dirkf avatar dstftw avatar filosottile avatar gcmalloc avatar gebn avatar goggle avatar iemejia avatar jaimemf avatar jeffcrouse avatar johnhawkinson avatar jwilk avatar lalinsky avatar mikecol avatar parmjitv avatar phihag avatar pukkandan avatar pulpe avatar remitamine avatar rg3 avatar rrooij avatar rudloff avatar rupertbaxter2 avatar rzhxeo avatar sprhawk avatar tithen-firion avatar trox1972 avatar xanadu avatar yasoob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youtube-dl's Issues

youtube-dl incompatible with python 3

I am using Arch Linux, and they recently upgraded the default python binary to python 3. The old version is still available under the name python2...
Please make the script compatible with python 3, to avoid future issues with linux distributions upgrading their packages.

Thanks for this great script!

Make temporary filename (.part) optional

I don't like the .part thing - could that be made optional? Best would be if there were some kind of youtubedlrc, but for the time being a command line option would be enough :)
thank you!

error: unable to download video

Already searched and tried several solutions on this site but i can't get it working.
terminal:
:/$ youtube-dl http://www.youtube.com/watch?v=SR6iYWJxHqs
[youtube] Setting language
[youtube] SR6iYWJxHqs: Downloading video webpage
[youtube] SR6iYWJxHqs: Downloading video info webpage
[youtube] SR6iYWJxHqs: Extracting video information
ERROR: unable to download video (format may not be available)

I'm using version 2010.12.09-1webupd8lucid from repo.
Has anyone a solution?

regards

youtube-dl: Does not support URLs used in embedded videos

Was: http://bitbucket.org/rg3/youtube-dl/issue/69/

Hi, Ricardo.

I am maintaining a Debian package of youtube-dl (and, as a consequence, also a package on Ubuntu, indirectly) and one user has made an enhancement request on Debian's bug

http://bugs.debian.org/495164

It seems that just a little parsing of the command line options would be sufficient, wouldn't it?

If you could give any feedback here, that would certainly be appreciated.

(I see that you already updated youtube-dl with the format for 1080p videos, for which I made a patch on the package).

Regards, Rogério Brito.

Output file size with -s or -g

Was: http://bitbucket.org/rg3/youtube-dl/issue/141/

If the file size was outputted it would be possible to script youtube-dl to test if the current video the the harddrive is in the best possible quality.

It happens that Youtube re-encode videos, and with higher resolution, so being able to extract the file size from youtube-dl would be very useful.

File size in bytes would be preferred.

402 Payment Required error

Even with the lastest code from master I am getting:

sh-3.2$ youtube-dl http://www.youtube.com/watch?v=rOwMW6agpTI

[youtube] Setting language

[youtube] rOwMW6agpTI: Downloading video webpage

[youtube] rOwMW6agpTI: Downloading video info webpage

ERROR: unable to download video info webpage: HTTP Error 402: Payment Required

[wishlist] InfoExtractor for YouTube Shows

Was: http://bitbucket.org/rg3/youtube-dl/issue/84/

Now that issue number 63 [note: from bitbucket.org] has been fixed (thanks rg!) and it is possible to download Shows via rtmpdump, it would be useful to support pointing youtube-dl at a show listing, such that it is treated the same way as a YouTube playlist, and all the linked episodes are downloaded.

e.g.,

http://www.youtube.com/show?p=yiRE6Z5QFLo&s=1
http://www.youtube.com/show?p=yiRE6Z5QFLo&s=2
etc.

This is (very) low priority, but would be a useful enhancement.

Thanks in advance.

can't get the program youtube.py running from Python IDLE

Hi,
I get the following error . (Python shell) please help.
when I run the program youtube.py


Usage: youtube2.py [options] url...

youtube2.py: error: you must provide at least one URL
Traceback (most recent call last):
File "/home/francis/.drpython/youtube2.py", line 2367, in
parser.error(u'you must provide at least one URL')
File "/usr/lib/python2.6/optparse.py", line 1578, in error
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
File "/usr/lib/python2.6/optparse.py", line 1568, in exit
sys.exit(status)
SystemExit: 2

catch HTTPError

just got a 404 from youtube but doesn't see it until i printed the plain error in FileDownloader.process_info.

only ERROR: unable to download video (format may not be available) is a little less info i think.

Print a list of available formats

It would be nice to have a CL option enabling one to obtain a list of all available formats for a specific video (URL). In other words, how can I know what to specify as FORMAT for -f? Thanks in advance.

Cannot rename file.

Hello,

I was running the youtube-dl to download some videos, and a few of them contained a special character (mainly the colon) that cannot be used in windows filenames.
The other special characters are: \ / * ? " < > |

I was using the output template "%(uploader)s-%(title)s.$(ext)s".

Python version: Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32.

Peter.

Support https

youtube videos are also accessible using https, whole URL is identical, but http changed to https. becuase I have plugins which redirects me to https versions of many sites, when I copy youtube URL to youtube-dl, i end with https enabled addres which isn't supported in youtube-dl.

It should not be hard to add "(https?://)?" regular expression patter to support this. Downloading isn't really need to be using https, but this will also be nice if possible.

Thanks

Youtube changed their download url again?

I am having trouble downloading from Youtube again. Maybe its because they have changed the way videos are accessed. Has anyone else been having trouble downloading? Is this problem being worked on?

ValueError: dictionary update sequence element #0 has length 1; 2 is required

The infamous error has reared its ugly head yet again:
ValueError: dictionary update sequence element #0 has length 1; 2 is required

This will show for any new videos you try to download. command line
options and output are pasted at the bottom.

I know this has happened many times before, but I can't find the
previous times in the issue tracker.
I downloaded what I think is the most recent snapshot (it said that
the commit was 9 hours ago) and the problem persists.
As I recall last time this happened you fixed it pretty quickly and it
had something to do with what youtube returns to you at some point in
your program.
One of these days I will have to dig into how this all works so I can
be more help in these situations.
Again thank you for a great program that is the basis for so much more.

$ ./youtube-dl -i -n -c -o %(uploader)s-%(stitle)s-%(id)s.%(ext)s
http://www.youtube.com/watch?v=oyxWLIJk-rU
[youtube] Setting language
[youtube] Logging in
[youtube] Confirming age
[youtube] oyxWLIJk-rU: Downloading video webpage
[youtube] oyxWLIJk-rU: Downloading video info webpage
[youtube] oyxWLIJk-rU: Extracting video information
Traceback (most recent call last):
File "./youtube-dl", line 2462, in
retcode = fd.download(all_urls)
File "./youtube-dl", line 481, in download
ie.extract(url)
File "./youtube-dl", line 711, in extract
return self._real_extract(url)
File "./youtube-dl", line 951, in _real_extract
url_map = dict(tuple(pair.split('|')) for pair in
video_info['fmt_url_map'][0].split(','))
ValueError: dictionary update sequence element #0 has length 1; 2 is required
$

Tolerate download failure of one url in case of multiple url parameter

Hi,
I have read through the existing issues and couldn't find anything in which this issue has already been brought up.

When I download multiple youtube videos by specifying more than 1 youtube url and if one of them had any issue in being downloaded like HTTP 404 the entire download stops. As download of the urls are independent of each other it will be nicer if the script continues to download other youtube videos after logging the error.

I am sorry if this already been brought up or fixed .. but i really need this.
I am using youtube-dl version 2010.12.09 on Ubuntu 10.04 LTS - the Lucid Lynx

php exec can't run it

so i wrote some simple python script to check it with exec('python26 simple.py') and it runs without problems, however when i try exec('python26 youtube-dl') it doesn' run.
when i run my script on shell from command line it runs. when i do that from the browser it is not runned.

why?

Missing/restricted files in playlists

When processing a playlist, there are a variety of reasons why a video might not be accessible: it might be deleted on its own, the whole user account might be removed or can be restricted to a geographic region. Currently the user is left with breaking download in this case and cannot do anything else but getting each video manually.
Case to the point: not being in England, the third video in list 404s out, breaking the download
http://www.youtube.com/view_play_list?p=F5D324185EE73FEC

What would be the right way to handle this situation?
I'm thinking about adding an extra option, like --skip-missing to ignore download errors for playlists and just skip those files. I started on it, just got a bit lost on the multiple level error handling. Before I go any deeper wanted to see what's the view on this.

youtube video download stopped working

They must have changed something, it's stopped working for youtube flv files, but it still works for videos passed to rtmpdump

I've not had a chance to look yet, so this is just a heads up in case you hadn't noticed

Video format codes are not listed anywhere

The --help text refers to "video format codes", but nowhere are these listed or defined. It gives the example of "17" as a format code (for the mobile version), which seems arbitrary to me. I couldn't find the codes in the source. My expectation of a "format code" would be something like "720p", "480p", "320p", or "240p". Do the used numeric codes correspond to these, and if so how?

-m is not working anymore

since today the -m function is not working anymore for youtube video's
ERROR: unable to download video (format may not be available)

youtube-dl -g generates URL that returns 403?

Hi,

A few weeks ago, I started to get 403: Forbidden errors when feeding the URL I got with youtube-dl -g to mplayer.

A sample URL:

http://v8.lscache3.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dYSFJPV19FSkNNOF9KSUFH&fexp=909303%2C907048&algorithm=throttle-factor&itag=35&ipbits=0&burst=40&sver=3&expire=1293249600&key=yt1&signature=1E9F33903B75FA54A3EF8B40E963915FA82C73FE.09936E18403B1DE582637657E6D53CA6077C1984&factor=1.25&id=e5a8f27215d95722

The youtube URL in this case: http://www.youtube.com/watch?v=5ajychXZVyI

Is there anything wrong with this URL, bad encoding maybe? Youtube-dl without the -g option happily downloads the file. I couldn't confirm that the URL -g is printing is in fact the same youtube-dl is using internally. Or could this be a browser string issue, where mplayer isn't sending one, causing youtube to reject it as a client? In that case it doesn't really have anything to do with youtube-dl, of course.

y the way, youtube-dl is a great tool, together with mplayer it gives me back a lot of the control people used to have, i.e. deciding where to put the video window, resizing it, using my own shortcut keys, the list goes on.. and it allows me to minimize the use of the Flash plugin.. so thanks a lot!

Tweak the regexp to retrieve videos from embedded URLs

Hi.

Some time ago, I received a bugreport on the Debian Bug Tracking system (see bug 495164 asking for support for some youtube embedded URLs. I forwarded this issue to the bitbucket times, but they apparently got lost.

Anyway, the URL in question is quite long, but the essential part seems to be quite simple:

http://www.youtube.com/swf/l.swf?video_id=K2S2rQUETwc(:?.*)

Regards.

proposal for dailymotion

Hello,

I think that Dailymotion has changed its code. the "dcmo_html user" div no longer works but there is a new code in .

Proposal (line 1303):

# mobj = re.search(r'(?im)
.*?(.+?)', webpage) mobj = re.search(r'(?im)(.+?)', webpage)

That's work fine for me

split youtube-dl on several modules

It is worth to split youtube-dl on several modules, e.g. youtube.py, metacafe.py, dailymotion.py and so on. Then it is possible to add "makefile" which will combine those files into youtube-dl file.

This approach is applied in https://github.com/sstephenson/prototype library for example.
As a rakefile analogue can be used distutils, scons.

By splitting youtube-dl it will be more easy to read, more easy to merge and source will not blow up in the case of adding support of lots new sites.

What do you think?

json powered youtube-dl

Advantages:
Faster, less code, more options and data via the API.

One way of implementing this would be to have youtube-dl preform a try/except statement and attempt to import json when it is updating. If it does not throw an exception, then it will update to the json version. Otherwise it will update to the json-less version.

Another way would be to include the json code into youtube-dl, but this will increase the size, and probably include more if/else statements. Although once it detects json, it will be able to use it as normal.

This could be the way to provide compatibility with Python 2.5 while enhancing/optimizing
2.6+

Commercial use

I just wanna know if i can use youtube-dl in a commercial website.

add support for http://videos.tf1.fr/ and http://www.canalplus.fr

Hi

Would it be possible to add support for http://videos.tf1.fr/ and http://www.canalplus.fr ?

tv show for the 2 web sites can be found here:

http://videos.tf1.fr/les-feux-de-l-amour/2011/les-feux-de-l-amour-episode-du-18-janvier-2011-6218863.html

and

http://www.canalplus.fr/c-divertissement/pid3351-le-petit-journal.html

It's seems those websites are only using RTMP.

If you do not want to add full support for those web sites, could you please at least check if it's possible ? If yes, could you also tell us some tips to do it (wireshark ?) ?

Thx in advance,
Sincerely,
Cap

Patch for setting title of Command Prompt in windows

Was: http://bitbucket.org/rg3/youtube-dl/issue/214/

So I have tweaked my little patch so that it doesn't do bad things on linux/mac. Note the check for the os.

def report_progress(self, percent_str, data_len_str, speed_str, eta_str):
                """Report download progress."""
                if self.params.get('noprogress', False):
                        return
                if (os.name == 'nt'):
                        os.system('title youtube-dl [%s]' % percent_str)                        
                self.to_stdout(u'\r[download] %s of %s at %s ETA %s' %
                                (percent_str, data_len_str, speed_str, eta_str), skip_eol=True)

Keep server timestamps

First of all, thank you for this incredible project. I love every option and everything is very thought out. Great work.

I think it would be nice if there could be an option to keep server timestamps. Safari, for example, does just that when downloading via its Activity Monitor. It would help me tremendously, as I organize content by date.

when download resumed, percentage counting is not updated

Sequnece

  1. youtube-dl
  2. After some time press Ctrl+C to break downloading.
  3. youtube-dl -c

Problem: file download is continued "Resuming download at byte ..." but percentage counting is started from zero. This is bizzard.

Expected: percentage counting should start from braked point. This is behavior common for most download tools.

python version to use ?

Hello,

Thank for this program.

Can you tell me which version of Python required for the program? It seems to work with Python 2.6 (Ubuntu) but not with Python 2.5 (Debian) ?

Yves

[youtube] Setting language
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl-NEW", line 2554, in 
    retcode = fd.download(all_urls)
  File "/usr/local/bin/youtube-dl-NEW", line 556, in download
    ie.extract(url)
  File "/usr/local/bin/youtube-dl-NEW", line 790, in extract
    self.initialize()
  File "/usr/local/bin/youtube-dl-NEW", line 785, in initialize
    self._real_initialize()
  File "/usr/local/bin/youtube-dl-NEW", line 890, in _real_initialize
    urllib2.urlopen(request).read()
  File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/lib/python2.5/urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.5/urllib2.py", line 419, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 582, in http_error_302
    return self.parent.open(new)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/local/bin/youtube-dl-NEW", line 208, in http_response
    resp = urllib2.addinfourl(gz, old_resp.headers, old_resp.url, old_resp.code)
TypeError: __init__() takes exactly 4 arguments (5 given)

New (Additional) option

Was: http://bitbucket.org/rg3/youtube-dl/issue/54/

new option idea..

right now you have an option called "--best-quality" or "-b" which prints out the best quality provided by youtube

so if there's 3 qualities of the video available.. 1. (video.flv - Low Quality 320x240) 2. (video.mp4 - High Quality 480x360) 3. (video.flv - High Quality 640x480)

Option "-b" will print out the url to the "(video.flv - High Quality 640x480)"

Which is awesome.. but it might come in handy for some people to have an option that prints out all the available urls (qualities)

So for example: "--all-qualities" will print out all 3 available quality URLs: 1. the direct cache url to low quality flv 2. the direct cache url to mp4 3. the direct cache url to high quality flv

[request] Improve handling of failed download in batch mode

Lets say I am downloading a set of files via --batch-file. and my Internet connection drops for a short time in the middle. The transfer seems to fail and leave a half-complete file, that you won't know about except by looking through the logs or by watching the video.

It seems like this could be easily accomplished by downloading using a temporary filename, and only renaming to the correct name after the download has succeeded.

Youtube link regex fails for youtu.be links.

Given the example link "http://youtu.be/watch?v=COiIC3A0ROM"
and the _VALID_URL regex present in the Jan 7 checkout, the groups() results are as follows:
('http://youtu.be/', 'watch')

The fix for the regex is a parenthesis that is placed too late. There should be an extra one after the ".com/" part, closing the optional matching group for youtu.be | \w+.youtube.com.

The regular expression that "works for me" is as follows:
_VALID_URL = r'^((?:https?://)?(?:youtu.be/|(?:\w+.)?youtube(?:-nocookie)?.com/)(?:(?:v/)|(?:(?:watch(?:popup)?(?:.php)?)?(?:?|#!?)(?:.+&)?v=)))?([0-9A-Za-z-]+)(?(1).+)?$'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.