projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58b5372
)
Make some of the comments more descriptive.
author
Rogério Brito
<rbrito@ime.usp.br>
Fri, 4 Feb 2011 06:02:29 +0000
(
04:02
-0200)
committer
Rogério Brito
<rbrito@ime.usp.br>
Fri, 4 Feb 2011 06:02:29 +0000
(
04:02
-0200)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index b96156be7f327ff2960a0e6903918683b56f0ae6..a925c9783663c03e77301cf34c9d40cdd9212207 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-1764,8
+1764,12
@@
class VimeoIE(InfoExtractor):
self._downloader.trouble(u'ERROR: Unable to retrieve video webpage: %s' % str(err))
return
self._downloader.trouble(u'ERROR: Unable to retrieve video webpage: %s' % str(err))
return
- # Extract uploader and title from webpage
+ # Now we begin extracting as much information as we can from what we
+ # retrieved. First we extract the information common to all extractors,
+ # and latter we extract those that are Vimeo specific.
self.report_extraction(video_id)
self.report_extraction(video_id)
+
+ # Extract title
mobj = re.search(r'<caption>(.*?)</caption>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract video title')
mobj = re.search(r'<caption>(.*?)</caption>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract video title')
@@
-1773,6
+1777,7
@@
class VimeoIE(InfoExtractor):
video_title = mobj.group(1).decode('utf-8')
simple_title = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', video_title)
video_title = mobj.group(1).decode('utf-8')
simple_title = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', video_title)
+ # Extract uploader
mobj = re.search(r'<uploader_url>http://vimeo.com/(.*?)</uploader_url>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract video uploader')
mobj = re.search(r'<uploader_url>http://vimeo.com/(.*?)</uploader_url>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract video uploader')
@@
-1795,14
+1800,14
@@
class VimeoIE(InfoExtractor):
# if not video_description: video_description = 'No description available.'
video_description = 'Foo.'
# if not video_description: video_description = 'No description available.'
video_description = 'Foo.'
- #
E
xtract request signature
+ #
Vimeo specific: e
xtract request signature
mobj = re.search(r'<request_signature>(.*?)</request_signature>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract request signature')
return
sig = mobj.group(1).decode('utf-8')
mobj = re.search(r'<request_signature>(.*?)</request_signature>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract request signature')
return
sig = mobj.group(1).decode('utf-8')
- # Extract request signature expiration
+ #
Vimeo specific:
Extract request signature expiration
mobj = re.search(r'<request_signature_expires>(.*?)</request_signature_expires>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract request signature expiration')
mobj = re.search(r'<request_signature_expires>(.*?)</request_signature_expires>', webpage)
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract request signature expiration')