1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-30 22:03:00 +08:00

[globo:article] Relax _VALID_URL and video id regex (Closes #10379)

This commit is contained in:
Sergey M․ 2016-08-19 01:13:45 +07:00
parent bd1bcd3ea0
commit 9e5751b9fe
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -396,12 +396,12 @@ class GloboIE(InfoExtractor):
class GloboArticleIE(InfoExtractor): class GloboArticleIE(InfoExtractor):
_VALID_URL = 'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/]+)\.html' _VALID_URL = 'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/]+)(?:\.html)?'
_VIDEOID_REGEXES = [ _VIDEOID_REGEXES = [
r'\bdata-video-id=["\'](\d{7,})', r'\bdata-video-id=["\'](\d{7,})',
r'\bdata-player-videosids=["\'](\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'\bdata-id=["\'](\d{7,})',
r'<div[^>]+\bid=["\'](\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', '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, 'only_matching': True,
}, {
'url': 'http://oglobo.globo.com/rio/a-amizade-entre-um-entregador-de-farmacia-um-piano-19946271',
'only_matching': True,
}] }]
@classmethod @classmethod