]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/gofile.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / gofile.py
index fac08846213986d9beb71ab3a80be32d90c56eeb..a9777a5946dbadfb94e9b2a2fc1bd0b57a616028 100644 (file)
@@ -20,8 +20,8 @@ class GofileIE(InfoExtractor):
                 'title': 'nuuh',
                 'release_timestamp': 1638338704,
                 'release_date': '20211201',
-            }
-        }]
+            },
+        }],
     }, {
         'url': 'https://gofile.io/d/is8lKr',
         'info_dict': {
@@ -63,7 +63,7 @@ def _entries(self, file_id):
         query_params = {'wt': '4fd6sg89d7s6'}  # From https://gofile.io/dist/js/alljs.js
         password = self.get_param('videopassword')
         if password:
-            query_params['password'] = hashlib.sha256(password.encode('utf-8')).hexdigest()
+            query_params['password'] = hashlib.sha256(password.encode()).hexdigest()
         files = self._download_json(
             f'https://api.gofile.io/contents/{file_id}', file_id, 'Getting filelist',
             query=query_params, headers={'Authorization': f'Bearer {self._TOKEN}'})
@@ -89,7 +89,7 @@ def _entries(self, file_id):
                     'title': file['name'].rsplit('.', 1)[0],
                     'url': file_url,
                     'filesize': file.get('size'),
-                    'release_timestamp': file.get('createTime')
+                    'release_timestamp': file.get('createTime'),
                 }
 
         if not found_files: