aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/nbc.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2020-11-20 00:52:59 +0530
committerpukkandan <pukkandan@gmail.com>2020-11-20 13:03:32 +0530
commit8bdd16b4993b8d546b4cbbdbe4710db0bc2f971b (patch)
treec5ba0d26e17bb3102c0b24886853d9a818e875c6 /youtube_dlc/extractor/nbc.py
parent228385340e9a976f52735078218a9b8ecfe7ae7a (diff)
downloadhypervideo-pre-8bdd16b4993b8d546b4cbbdbe4710db0bc2f971b.tar.lz
hypervideo-pre-8bdd16b4993b8d546b4cbbdbe4710db0bc2f971b.tar.xz
hypervideo-pre-8bdd16b4993b8d546b4cbbdbe4710db0bc2f971b.zip
Merge 'ytdl-org/youtube-dl/master' release 2020.11.19
Old Extractors left behind: VLivePlaylistIE YoutubeSearchURLIE YoutubeShowIE YoutubeFavouritesIE If removing old extractors, make corresponding changes in docs/supportedsites.md youtube_dlc/extractor/extractors.py Not merged: .github/ISSUE_TEMPLATE/1_broken_site.md .github/ISSUE_TEMPLATE/2_site_support_request.md .github/ISSUE_TEMPLATE/3_site_feature_request.md .github/ISSUE_TEMPLATE/4_bug_report.md .github/ISSUE_TEMPLATE/5_feature_request.md test/test_all_urls.py youtube_dlc/version.py Changelog
Diffstat (limited to 'youtube_dlc/extractor/nbc.py')
-rw-r--r--youtube_dlc/extractor/nbc.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/youtube_dlc/extractor/nbc.py b/youtube_dlc/extractor/nbc.py
index 6f3cb3003..ea5f5a315 100644
--- a/youtube_dlc/extractor/nbc.py
+++ b/youtube_dlc/extractor/nbc.py
@@ -10,7 +10,6 @@ from .adobepass import AdobePassIE
from ..compat import compat_urllib_parse_unquote
from ..utils import (
int_or_none,
- js_to_json,
parse_duration,
smuggle_url,
try_get,
@@ -394,8 +393,8 @@ class NBCNewsIE(ThePlatformIE):
webpage = self._download_webpage(url, video_id)
data = self._parse_json(self._search_regex(
- r'window\.__data\s*=\s*({.+});', webpage,
- 'bootstrap json'), video_id, js_to_json)
+ r'<script[^>]+id="__NEXT_DATA__"[^>]*>({.+?})</script>',
+ webpage, 'bootstrap json'), video_id)['props']['initialState']
video_data = try_get(data, lambda x: x['video']['current'], dict)
if not video_data:
video_data = data['article']['content'][0]['primaryMedia']['video']