]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/vyborymos.py
[extractor] Standardize `_live_title`
[yt-dlp.git] / yt_dlp / extractor / vyborymos.py
index 9e703c4b6717cc3a3056a4d32ad687d4515ac2c7..4d93666c54dcebe70267fbf091d7ca048a71657a 100644 (file)
@@ -44,11 +44,11 @@ def _real_extract(self, url):
         info = self._download_json(
             'http://vybory.mos.ru/json/voting_stations/%s/%s.json'
             % (compat_str(station_id)[:3], station_id),
-            station_id, 'Downloading station JSON', fatal=False)
+            station_id, 'Downloading station JSON', fatal=False) or {}
 
         return {
             'id': station_id,
-            'title': self._live_title(info['name'] if info else station_id),
+            'title': info.get('name') or station_id,
             'description': info.get('address'),
             'is_live': True,
             'formats': formats,