]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[globo:article] Relax _VALID_URL and video id regex (Closes #10379)
authorSergey M․ <dstftw@gmail.com>
Thu, 18 Aug 2016 18:13:45 +0000 (01:13 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 18 Aug 2016 18:13:45 +0000 (01:13 +0700)
youtube_dl/extractor/globo.py

index 3de8356f68ef67e0913fd958995ad1d3e48ac62f..dbacbfc61ffbdea6f595f2182acf78261e3c8053 100644 (file)
@@ -396,12 +396,12 @@ class GloboIE(InfoExtractor):
 
 
 class GloboArticleIE(InfoExtractor):
-    _VALID_URL = 'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/]+)\.html'
+    _VALID_URL = 'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/]+)(?:\.html)?'
 
     _VIDEOID_REGEXES = [
         r'\bdata-video-id=["\'](\d{7,})',
         r'\bdata-player-videosids=["\'](\d{7,})',
-        r'\bvideosIDs\s*:\s*["\'](\d{7,})',
+        r'\bvideosIDs\s*:\s*["\']?(\d{7,})',
         r'\bdata-id=["\'](\d{7,})',
         r'<div[^>]+\bid=["\'](\d{7,})',
     ]
@@ -423,6 +423,9 @@ class GloboArticleIE(InfoExtractor):
     }, {
         'url': 'http://gshow.globo.com/programas/tv-xuxa/O-Programa/noticia/2014/01/xuxa-e-junno-namoram-muuuito-em-luau-de-zeze-di-camargo-e-luciano.html',
         'only_matching': True,
+    }, {
+        'url': 'http://oglobo.globo.com/rio/a-amizade-entre-um-entregador-de-farmacia-um-piano-19946271',
+        'only_matching': True,
     }]
 
     @classmethod