mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-25 18:27:42 +00:00
Merge pull request #14392 from snipem/nbc-fix
Fix for JSON meta data download(closes #13651)
This commit is contained in:
commit
bfd484ccff
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,7 @@ from ..utils import (
|
|||
|
||||
|
||||
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 = [
|
||||
{
|
||||
|
@ -72,6 +72,7 @@ class NBCIE(AdobePassIE):
|
|||
|
||||
def _real_extract(self, url):
|
||||
permalink, video_id = re.match(self._VALID_URL, url).groups()
|
||||
permalink = 'http' + permalink
|
||||
video_data = self._download_json(
|
||||
'https://api.nbc.com/v3/videos', video_id, query={
|
||||
'filter[permalink]': permalink,
|
||||
|
|
Loading…
Reference in a new issue