]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/polsatgo.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / polsatgo.py
index ecf2132b4ba3f31b06219e2f087878d79cb278f4..d4a0d6ab872a82cddb8c165665ac1bf4bf6ca79a 100644 (file)
@@ -33,7 +33,7 @@ def _extract_formats(self, sources, video_id):
                 continue
             yield {
                 'url': url,
-                'height': int_or_none(try_get(source, lambda x: x['quality'][:-1]))
+                'height': int_or_none(try_get(source, lambda x: x['quality'][:-1])),
             }
 
     def _real_extract(self, url):
@@ -47,7 +47,7 @@ def _real_extract(self, url):
             'id': video_id,
             'title': media['displayInfo']['title'],
             'formats': formats,
-            'age_limit': int_or_none(media['displayInfo']['ageGroup'])
+            'age_limit': int_or_none(media['displayInfo']['ageGroup']),
         }
 
     def _call_api(self, endpoint, media_id, method, params):
@@ -77,7 +77,7 @@ def _call_api(self, endpoint, media_id, method, params):
                     'clientId': rand_uuid,
                     'cpid': 1,
                 },
-            }).encode('utf-8'),
+            }).encode(),
             headers={'Content-type': 'application/json'})
         if not res.get('result'):
             if res['error']['code'] == 13404: