ytdl-org / youtube-dl Goto Github PK
View Code? Open in Web Editor NEWCommand-line program to download videos from YouTube.com and other video sites
Home Page: http://ytdl-org.github.io/youtube-dl/
License: The Unlicense
Command-line program to download videos from YouTube.com and other video sites
Home Page: http://ytdl-org.github.io/youtube-dl/
License: The Unlicense
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.
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
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.
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?
I just wanna know if i can use youtube-dl in a commercial website.
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
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
$
Documentation about the output template should use the identifier "autonumber" instead of "ord" according to the recent changes in the master tree.
Was: http://bitbucket.org/rg3/youtube-dl/issue/173/
On any video with rtmpe youtube-dl correctly identifies:
[youtube] RTMP download detected
However the download will always stop at about the same place with:
[rtmpdump] 93716588 bytes ERROR: rtmpdump exited with code 1
Using option -c results in rtmpdump exiting immediately.
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)
youtube-dl doesn't seem to support playlists referenced via youtube.com/p/$playlist_id , as used in embedded playlists.
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!
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.
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?
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
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.
Was: http://bitbucket.org/rg3/youtube-dl/issue/52/
when attempting to download private videos it logs in ok, then receive the following error: ERROR: YouTube said: This is a private video. If you have been sent this video, please make sure you accept the sender's friend request.
I can open this video fine within youtube.
running version 2009.09.13 on OS X 10.6.1
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
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?
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
Was: http://bitbucket.org/rg3/youtube-dl/issue/221/
Solution: Downgraded openssl to install the latest version of rtmpdump; this fixed this issue. This should be better documented in the next version.
Was: http://bitbucket.org/rg3/youtube-dl/issue/159/
Is it possible to include the uploaders Date to the filename. The epoch option is the download date?
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:
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
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)
Since the change on YouTube on 9-12-2010 the returned download url doesn't work.
I get a HTML "Forbidden"
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
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
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).+)?$'
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.
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.
Here's an example of a artist playlist: http://www.youtube.com/artist?a=GxdCwVVULXeca7q5-_o80IkZ-Dp-BF5s
It's probably very similar to a videos playlist, looks like it's the parameter "playnext=x" that determines what video to play rather than "index=x". It would be nice to get this feature.
Thanks
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+
Was: http://bitbucket.org/rg3/youtube-dl/issue/83/
Hi there thanks for the program!
is it possible to have an option to extract the youtube video as mp3s?
I am using a mac btw and i love ur program on my terminall
Was: http://bitbucket.org/rg3/youtube-dl/issue/162/
Would it be possible to download the File Description (Uploaders Comment) also and store it into a file named like the video with the extension txt or so?
Was: http://bitbucket.org/rg3/youtube-dl/issue/107/
Don't know if this is a bug or unimplemented function, but downloading from a user-channel without a playlist only downloads the video currently shown at the user-page, ignoring all other uploads by that user. Trying to get down all at : http://www.youtube.com/user/JudgeJudyForLife
Sequnece
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.
Yesterday it was working, today it isn't working... what should i do?
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
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.
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?
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.
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.
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.
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!
Was: http://bitbucket.org/rg3/youtube-dl/issue/186/
Hello. youtube-dl downloads only the low-quality video of a Dailymotion page while a Firefox add-on (DownloadHelper) downloads the "normal" quality.
As youtube-dl is meant to be a youtube-downloader I set the type of this issue as "enchancement" and not bug.
Was: http://bitbucket.org/rg3/youtube-dl/issue/203/
This site can be used to view and download youtube videos even if they are not available for some reason through youtube. The only thing the user has to do, is to replace "youtube" in a url with "kickyoutube". The implementation may not be that easy though.
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:
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!
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
since today the -m function is not working anymore for youtube video's
ERROR: unable to download video (format may not be available)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.