]> jfr.im git - yt-dlp.git/commitdiff
code consistency
authorMatthew <redacted>
Sat, 14 Nov 2020 20:34:59 +0000 (09:34 +1300)
committerMatthew <redacted>
Sat, 14 Nov 2020 20:34:59 +0000 (09:34 +1300)
youtube_dlc/extractor/youtube.py

index 76c98ba36f7b84e8f419b1f6bbbd631595d7c8b3..a9b591125f13c15fe4a08b323bb038e7e9131716 100644 (file)
@@ -3343,7 +3343,7 @@ def _entries(self, query, n):
             # changing the index location of videos and token.
             # So we search through all entries till we find them.
             for index, isr in enumerate(slr_contents):
-                if len(isr_contents) == 0:
+                if not isr_contents:
                     isr_contents = try_get(
                         slr_contents,
                         (lambda x: x[index]['itemSectionRenderer']['contents']),
@@ -3360,7 +3360,7 @@ def _entries(self, query, n):
                         lambda x: x[index]['continuationItemRenderer']['continuationEndpoint']['continuationCommand'][
                             'token'],
                         compat_str)
-                if continuation_token is not None and isr_contents != []:
+                if continuation_token is not None and isr_contents:
                     break
 
             if not isr_contents: