aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--youtube/util.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/youtube/util.py b/youtube/util.py
index fd6ca1a..44ae1ba 100644
--- a/youtube/util.py
+++ b/youtube/util.py
@@ -292,9 +292,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None,
content,
response.getheader('Content-Encoding', default='identity'))
- if (response.status == 429
- and content.startswith(b'<!DOCTYPE')
- and b'Our systems have detected unusual traffic' in content):
+ if response.status == 429:
ip = re.search(
br'IP address: ((?:[\da-f]*:)+[\da-f]+|(?:\d+\.)+\d+)',
content)