From 1b68ebd3811f9a72478ce52e38a96188aa93b2f9 Mon Sep 17 00:00:00 2001 From: bashonly Date: Tue, 13 May 2025 08:17:26 -0500 Subject: [PATCH] [ie] Use `!=` instead of `not ==` Authored by: bashonly --- yt_dlp/extractor/soundcloud.py | 2 +- yt_dlp/extractor/twitter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/soundcloud.py b/yt_dlp/extractor/soundcloud.py index c70940a606..3496a08ef6 100644 --- a/yt_dlp/extractor/soundcloud.py +++ b/yt_dlp/extractor/soundcloud.py @@ -697,7 +697,7 @@ class SoundcloudIE(SoundcloudBaseIE): try: return self._extract_info_dict(info, full_title, token) except ExtractorError as e: - if not isinstance(e.cause, HTTPError) or not e.cause.status == 429: + if not isinstance(e.cause, HTTPError) or e.cause.status != 429: raise self.report_warning( 'You have reached the API rate limit, which is ~600 requests per ' diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index 5eee3e7263..ad3e745884 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -1342,7 +1342,7 @@ class TwitterIE(TwitterBaseIE): 'tweet_mode': 'extended', }) except ExtractorError as e: - if not isinstance(e.cause, HTTPError) or not e.cause.status == 429: + if not isinstance(e.cause, HTTPError) or e.cause.status != 429: raise self.report_warning('Rate-limit exceeded; falling back to syndication endpoint') status = self._call_syndication_api(twid)