diff options
author | Matthew <colethedj@protonmail.com> | 2020-11-15 09:34:59 +1300 |
---|---|---|
committer | Matthew <colethedj@protonmail.com> | 2020-11-15 09:34:59 +1300 |
commit | 9da76d30decd079dbd3ca3d708e475a6201754e4 (patch) | |
tree | 44ba713ecd13cc81ca471a6b9cb0c86016062890 | |
parent | 0366ae875692bbe38867761952db70a62e32fd53 (diff) | |
download | hypervideo-pre-9da76d30decd079dbd3ca3d708e475a6201754e4.tar.lz hypervideo-pre-9da76d30decd079dbd3ca3d708e475a6201754e4.tar.xz hypervideo-pre-9da76d30decd079dbd3ca3d708e475a6201754e4.zip |
code consistency
-rw-r--r-- | youtube_dlc/extractor/youtube.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index 76c98ba36..a9b591125 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -3343,7 +3343,7 @@ class YoutubeSearchIE(SearchInfoExtractor, YoutubePlaylistBaseInfoExtractor): # 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 @@ class YoutubeSearchIE(SearchInfoExtractor, YoutubePlaylistBaseInfoExtractor): 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: |