0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-28 03:13:01 +00:00

Merge pull request #14392 from snipem/nbc-fix

Fix for JSON meta data download(closes #13651)
This commit is contained in:
remitamine 2017-10-03 14:49:55 +00:00 committed by GitHub
commit bfd484ccff

View file

@ -15,7 +15,7 @@
class NBCIE(AdobePassIE): class NBCIE(AdobePassIE):
_VALID_URL = r'(?P<permalink>https?://(?:www\.)?nbc\.com/[^/]+/video/[^/]+/(?P<id>n?\d+))' _VALID_URL = r'https?(?P<permalink>://(?:www\.)?nbc\.com/[^/]+/video/[^/]+/(?P<id>n?\d+))'
_TESTS = [ _TESTS = [
{ {
@ -72,6 +72,7 @@ class NBCIE(AdobePassIE):
def _real_extract(self, url): def _real_extract(self, url):
permalink, video_id = re.match(self._VALID_URL, url).groups() permalink, video_id = re.match(self._VALID_URL, url).groups()
permalink = 'http' + permalink
video_data = self._download_json( video_data = self._download_json(
'https://api.nbc.com/v3/videos', video_id, query={ 'https://api.nbc.com/v3/videos', video_id, query={
'filter[permalink]': permalink, 'filter[permalink]': permalink,