Merge pull request #905 from rbrito/manpage-apropos
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 23 Jun 2013 16:41:59 +0000 (09:41 -0700)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 23 Jun 2013 16:41:59 +0000 (09:41 -0700)
README: Add brief description for manpages/apropos.

youtube_dl/InfoExtractors.py
youtube_dl/__init__.py

index 619ddeba1c8ff06587d4c4945aff0c679053555f..cd91c13f520d36104c4f4d9aaaa2d4e7746e7917 100755 (executable)
@@ -1409,6 +1409,13 @@ class GenericIE(InfoExtractor):
         if mobj is None:
             # Try to find twitter cards info
             mobj = re.search(r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage)
+        if mobj is None:
+            # We look for Open Graph info:
+            # We have to match any number spaces between elements, some sites try to align them (eg.: statigr.am)
+            m_video_type = re.search(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
+            # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
+            if m_video_type is not None:
+                mobj = re.search(r'<meta.*?property="og:video".*?content="(.*?)"', webpage)
         if mobj is None:
             raise ExtractorError(u'Invalid URL: %s' % url)
 
index 9279ce7769967b9b2df69a1d1c88d6b0701b6beb..32141439f6c26a1445462680713aa621f6bf8268 100644 (file)
@@ -200,7 +200,7 @@ def parseOpts(overrideArguments=None):
             action='store_true', dest='listsubtitles',
             help='lists all available subtitles for the video (currently youtube only)', default=False)
     video_format.add_option('--sub-format',
-            action='store', dest='subtitlesformat', metavar='LANG',
+            action='store', dest='subtitlesformat', metavar='FORMAT',
             help='subtitle format [srt/sbv] (default=srt) (currently youtube only)', default='srt')
     video_format.add_option('--sub-lang', '--srt-lang',
             action='store', dest='subtitleslang', metavar='LANG',