diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2022-10-03 21:04:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 02:34:39 +0530 |
commit | dd4411aac2ef72edb170efb38d19b13b82271cc4 (patch) | |
tree | fd565cb7e693052ca57e2c30be72148dbf2db097 | |
parent | 1d77d8ce07d21850cac2be6fcffea3311234bc16 (diff) | |
download | hypervideo-pre-dd4411aac2ef72edb170efb38d19b13b82271cc4.tar.lz hypervideo-pre-dd4411aac2ef72edb170efb38d19b13b82271cc4.tar.xz hypervideo-pre-dd4411aac2ef72edb170efb38d19b13b82271cc4.zip |
[extractor/nfl] Fix extractor (#5130)
Closes #1708
Authored by: bashonly
-rw-r--r-- | yt_dlp/extractor/nfl.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/yt_dlp/extractor/nfl.py b/yt_dlp/extractor/nfl.py index e5810b346..106566611 100644 --- a/yt_dlp/extractor/nfl.py +++ b/yt_dlp/extractor/nfl.py @@ -53,8 +53,7 @@ class NFLBaseIE(InfoExtractor): ) )/ ''' - _VIDEO_CONFIG_REGEX = r'<script[^>]+id="[^"]*video-config-[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}[^"]*"[^>]*>\s*({.+})' - _WORKING = False + _VIDEO_CONFIG_REGEX = r'<script[^>]+id="[^"]*video-config-[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}[^"]*"[^>]*>\s*({.+});?\s*</script>' def _parse_video_config(self, video_config, display_id): video_config = self._parse_json(video_config, display_id) @@ -66,7 +65,7 @@ class NFLBaseIE(InfoExtractor): 'Anvato', mcp_id) else: media_id = item.get('id') or item['entityId'] - title = item['title'] + title = item.get('title') item_url = item['url'] info = {'id': media_id} ext = determine_ext(item_url) @@ -108,6 +107,9 @@ class NFLIE(NFLBaseIE): 'timestamp': 1608009755, 'thumbnail': r're:^https?://.*\.jpg$', 'uploader': 'NFL', + 'tags': 'count:6', + 'duration': 157, + 'categories': 'count:3', } }, { 'url': 'https://www.chiefs.com/listen/patrick-mahomes-travis-kelce-react-to-win-over-dolphins-the-breakdown', @@ -117,7 +119,8 @@ class NFLIE(NFLBaseIE): 'ext': 'mp3', 'title': 'Patrick Mahomes, Travis Kelce React to Win Over Dolphins | The Breakdown', 'description': 'md5:12ada8ee70e6762658c30e223e095075', - } + }, + 'skip': 'HTTP Error 404: Not Found', }, { 'url': 'https://www.buffalobills.com/video/buffalo-bills-military-recognition-week-14', 'only_matching': True, |