Compare commits

...

7 Commits

Author SHA1 Message Date
Philipp Hagemeister
b90bcbe79e Bump version number 2011-09-13 23:58:46 +02:00
Philipp Hagemeister
8236e85178 s#phihag#rg3 2011-09-13 23:58:31 +02:00
Philipp Hagemeister
803abae206 Do not claim copyright in README (Closes #157) 2011-09-13 23:54:50 +02:00
Philipp Hagemeister
50bdd8a9e7 Merge remote-tracking branch 'knagano/master' 2011-09-13 23:50:44 +02:00
Philipp Hagemeister
34554a7ad4 Merge remote-tracking branch 'CaptainPatate/master' 2011-09-13 23:35:48 +02:00
knagano
62a29bbf7b Fixed download from Dailymotion.
Fetches FLV URL from "sdURL" in addVariable("sequence") JSON,
instead of addVariable("video") which doesnot exist today.
Supports new title, uploader nickname format.
2011-05-07 22:53:37 +09:00
Amaury Gauthier
e26005adea Deletes duplicate entry in process_info dictionary of YahooIE 2011-04-07 23:25:47 +02:00
2 changed files with 18 additions and 14 deletions

View File

@@ -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:

View File

@@ -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: