]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/yappy.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / yappy.py
index 5ce647eeea43d37ec91781be531f8b0aed8204ec..171e0f13655cb1098c96e22938938090879a19b4 100644 (file)
@@ -27,7 +27,7 @@ class YappyIE(InfoExtractor):
             'categories': ['Образование и наука', 'Лайфхак', 'Технологии', 'Арт/искусство'],
             'repost_count': int,
             'uploader': 'YAPPY',
-        }
+        },
     }, {
         'url': 'https://yappy.media/video/3862451954ad4bd58ae2ccefddb0bd33',
         'info_dict': {
@@ -43,7 +43,7 @@ class YappyIE(InfoExtractor):
             'uploader': 'LENA SHTURMAN',
             'upload_date': '20230126',
             'thumbnail': 'https://cdn-st.ritm.media/static/pic/user_thumbnails/6e76bb4bbad640b6/9ec84c115b2b1967/1674716171.jpg',
-        }
+        },
     }]
 
     def _real_extract(self, url):
@@ -64,13 +64,13 @@ def _real_extract(self, url):
             'url': media_url,
             'ext': 'mp4',
             'format_note': 'Watermarked' if has_watermark else None,
-            'preference': -10 if has_watermark else None
+            'preference': -10 if has_watermark else None,
         }] if media_url else []
 
         if has_watermark:
             formats.append({
                 'url': media_url.replace('-wm.mp4', '.mp4'),
-                'ext': 'mp4'
+                'ext': 'mp4',
             })
 
         audio_link = traverse_obj(media_data, ('audio', 'link'))
@@ -79,7 +79,7 @@ def _real_extract(self, url):
                 'url': audio_link,
                 'ext': 'mp3',
                 'acodec': 'mp3',
-                'vcodec': 'none'
+                'vcodec': 'none',
             })
 
         return {
@@ -97,7 +97,7 @@ def _real_extract(self, url):
             'uploader': traverse_obj(media_data, ('creator', 'firstName')),
             'uploader_id': traverse_obj(media_data, ('creator', ('uuid', 'nickname')), get_all=False),
             'categories': traverse_obj(media_data, ('categories', ..., 'name')) or None,
-            'repost_count': int_or_none(media_data.get('sharingCount'))
+            'repost_count': int_or_none(media_data.get('sharingCount')),
         }