mirror of
https://gitlab.com/ytdl-org/youtube-dl.git
synced 2026-01-24 00:00:10 -05:00
Compare commits
7 Commits
2011.09.13
...
2011.09.14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b90bcbe79e | ||
|
|
8236e85178 | ||
|
|
803abae206 | ||
|
|
50bdd8a9e7 | ||
|
|
34554a7ad4 | ||
|
|
62a29bbf7b | ||
|
|
e26005adea |
12
README.md
12
README.md
@@ -70,7 +70,7 @@ Most people asking this question are not aware that youtube-dl now defaults to d
|
||||
|
||||
### I get HTTP error 402 when trying to download a video. What''s this?
|
||||
|
||||
Apparently YouTube requires you to pass a CAPTCHA test if you download too much. We''re [considering to provide a way to let you solve the CAPTCHA](https://github.com/phihag/youtube-dl/issues/8), but at the moment, your best course of action is pointing a webbrowser to the youtube URL, solving the CAPTCHA, and restart youtube-dl.
|
||||
Apparently YouTube requires you to pass a CAPTCHA test if you download too much. We''re [considering to provide a way to let you solve the CAPTCHA](https://github.com/rg3/youtube-dl/issues/154), but at the moment, your best course of action is pointing a webbrowser to the youtube URL, solving the CAPTCHA, and restart youtube-dl.
|
||||
|
||||
### I have downloaded a video but how can I play it?
|
||||
|
||||
@@ -85,14 +85,14 @@ The URLs youtube-dl outputs require the downloader to have the correct cookies.
|
||||
youtube has switched to a new video info format in July 2011 which is not supported by old versions of youtube-dl. You can update youtube-dl with `sudo youtube-dl --update`.
|
||||
|
||||
## COPYRIGHT
|
||||
**youtube-dl**: Copyright © 2006-2011 Ricardo Garcia Gonzalez. The program is
|
||||
released into the public domain by the copyright holder. This README file was
|
||||
originally written by Daniel Bolton (<https://github.com/dbbolton>) and is
|
||||
likewise released into the public domain.
|
||||
|
||||
youtube-dl is released into the public domain by the copyright holders.
|
||||
|
||||
This README file was originally written by Daniel Bolton (<https://github.com/dbbolton>) and is likewise released into the public domain.
|
||||
|
||||
## BUGS
|
||||
|
||||
Bugs and suggestions should be reported at: <https://github.com/phihag/youtube-dl/issues>
|
||||
Bugs and suggestions should be reported at: <https://github.com/rg3/youtube-dl/issues>
|
||||
|
||||
Please include:
|
||||
|
||||
|
||||
20
youtube-dl
20
youtube-dl
@@ -15,9 +15,9 @@ __author__ = (
|
||||
)
|
||||
|
||||
__license__ = 'Public Domain'
|
||||
__version__ = '2011.09.13'
|
||||
__version__ = '2011.09.14'
|
||||
|
||||
UPDATE_URL = 'https://raw.github.com/phihag/youtube-dl/master/youtube-dl'
|
||||
UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl'
|
||||
|
||||
import cookielib
|
||||
import datetime
|
||||
@@ -1523,6 +1523,7 @@ class DailymotionIE(InfoExtractor):
|
||||
|
||||
# Retrieve video webpage to extract further information
|
||||
request = urllib2.Request(url)
|
||||
request.add_header('Cookie', 'family_filter=off')
|
||||
try:
|
||||
self.report_download_webpage(video_id)
|
||||
webpage = urllib2.urlopen(request).read()
|
||||
@@ -1532,25 +1533,29 @@ class DailymotionIE(InfoExtractor):
|
||||
|
||||
# Extract URL, uploader and title from webpage
|
||||
self.report_extraction(video_id)
|
||||
mobj = re.search(r'(?i)addVariable\(\"video\"\s*,\s*\"([^\"]*)\"\)', webpage)
|
||||
mobj = re.search(r'(?i)addVariable\(\"sequence\"\s*,\s*\"([^\"]+?)\"\)', webpage)
|
||||
if mobj is None:
|
||||
self._downloader.trouble(u'ERROR: unable to extract media URL')
|
||||
return
|
||||
mediaURL = urllib.unquote(mobj.group(1))
|
||||
sequence = urllib.unquote(mobj.group(1))
|
||||
mobj = re.search(r',\"sdURL\"\:\"([^\"]+?)\",', sequence)
|
||||
if mobj is None:
|
||||
self._downloader.trouble(u'ERROR: unable to extract media URL')
|
||||
return
|
||||
mediaURL = urllib.unquote(mobj.group(1)).replace('\\', '')
|
||||
|
||||
# if needed add http://www.dailymotion.com/ if relative URL
|
||||
|
||||
video_url = mediaURL
|
||||
|
||||
# '<meta\s+name="title"\s+content="Dailymotion\s*[:\-]\s*(.*?)"\s*\/\s*>'
|
||||
mobj = re.search(r'(?im)<title>Dailymotion\s*[\-:]\s*(.+?)</title>', webpage)
|
||||
mobj = re.search(r'(?im)<title>Dailymotion\s*-\s*(.+)\s*-\s*[^<]+?</title>', webpage)
|
||||
if mobj is None:
|
||||
self._downloader.trouble(u'ERROR: unable to extract title')
|
||||
return
|
||||
video_title = mobj.group(1).decode('utf-8')
|
||||
video_title = sanitize_title(video_title)
|
||||
|
||||
mobj = re.search(r'(?im)<Attribute name="owner">(.+?)</Attribute>', webpage)
|
||||
mobj = re.search(r'(?im)<span class="owner[^\"]+?">[^<]+?<a [^>]+?>([^<]+?)</a></span>', webpage)
|
||||
if mobj is None:
|
||||
self._downloader.trouble(u'ERROR: unable to extract uploader nickname')
|
||||
return
|
||||
@@ -1917,7 +1922,6 @@ class YahooIE(InfoExtractor):
|
||||
'thumbnail': video_thumbnail.decode('utf-8'),
|
||||
'description': video_description,
|
||||
'thumbnail': video_thumbnail,
|
||||
'description': video_description,
|
||||
'player_url': None,
|
||||
})
|
||||
except UnavailableVideoError:
|
||||
|
||||
Reference in New Issue
Block a user