]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/japandiet.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / japandiet.py
index 6c650568acda79b96cc1f02fad5a430f2903b1c3..2ef091aff23f2300b858ca4a8f9f44a8af7a9ea2 100644 (file)
@@ -1,5 +1,6 @@
 import re
 
+from .common import InfoExtractor
 from ..utils import (
     ExtractorError,
     clean_html,
@@ -9,9 +10,8 @@
     smuggle_url,
     traverse_obj,
     try_call,
-    unsmuggle_url
+    unsmuggle_url,
 )
-from .common import InfoExtractor
 
 
 def _parse_japanese_date(text):
@@ -41,7 +41,7 @@ def _parse_japanese_duration(text):
     mobj = re.search(r'(?:(\d+)日間?)?(?:(\d+)時間?)?(?:(\d+)分)?(?:(\d+)秒)?', re.sub(r'[\s\u3000]+', '', text or ''))
     if not mobj:
         return
-    days, hours, mins, secs = [int_or_none(x, default=0) for x in mobj.groups()]
+    days, hours, mins, secs = (int_or_none(x, default=0) for x in mobj.groups())
     return secs + mins * 60 + hours * 60 * 60 + days * 24 * 60 * 60
 
 
@@ -142,10 +142,10 @@ class ShugiinItvVodIE(ShugiinItvBaseIE):
             'title': 'ウクライナ大統領国会演説(オンライン)',
             'release_date': '20220323',
             'chapters': 'count:4',
-        }
+        },
     }, {
         'url': 'https://www.shugiintv.go.jp/en/index.php?ex=VL&media_type=&deli_id=53846',
-        'only_matching': True
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):
@@ -232,7 +232,7 @@ class SangiinIE(InfoExtractor):
             'is_live': True,
         },
         'skip': 'this live is turned into archive after it ends',
-    }]
+    }]
 
     def _real_extract(self, url):
         video_id = self._match_id(url)