summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/theweatherchannel.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/theweatherchannel.py')
-rw-r--r--yt_dlp/extractor/theweatherchannel.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/theweatherchannel.py b/yt_dlp/extractor/theweatherchannel.py
index d1921e4..424f778 100644
--- a/yt_dlp/extractor/theweatherchannel.py
+++ b/yt_dlp/extractor/theweatherchannel.py
@@ -24,7 +24,7 @@ class TheWeatherChannelIE(ThePlatformIE): # XXX: Do not subclass from concrete
'timestamp': 1689967343,
'display_id': 'invest-95l-in-atlantic-has-a-medium-chance-of-development',
'duration': 34.0,
- }
+ },
}, {
'url': 'https://weather.com/en-CA/international/videos/video/unidentified-object-falls-from-sky-in-india',
'only_matching': True,
@@ -34,7 +34,7 @@ class TheWeatherChannelIE(ThePlatformIE): # XXX: Do not subclass from concrete
asset_name, locale, display_id = self._match_valid_url(url).groups()
if not locale:
locale = 'en-US'
- video_data = list(self._download_json(
+ video_data = next(iter(self._download_json(
'https://weather.com/api/v1/p/redux-dal', display_id, data=json.dumps([{
'name': 'getCMSAssetsUrlConfig',
'params': {
@@ -44,10 +44,10 @@ class TheWeatherChannelIE(ThePlatformIE): # XXX: Do not subclass from concrete
'$in': asset_name,
},
},
- }
+ },
}]).encode(), headers={
'Content-Type': 'application/json',
- })['dal']['getCMSAssetsUrlConfig'].values())[0]['data'][0]
+ })['dal']['getCMSAssetsUrlConfig'].values()))['data'][0]
video_id = video_data['id']
seo_meta = video_data.get('seometa', {})
title = video_data.get('title') or seo_meta['title']