diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-11-16 13:19:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-16 13:19:51 +0100 |
commit | 6ce493d4dfc2884832ff5b5be4479a55818b2fe7 (patch) | |
tree | 92e9efce62f7832ebe56969c120d8e92e75881a3 /g4f/requests/raise_for_status.py | |
parent | Update internet.py (diff) | |
download | gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.tar gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.tar.gz gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.tar.bz2 gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.tar.lz gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.tar.xz gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.tar.zst gpt4free-6ce493d4dfc2884832ff5b5be4479a55818b2fe7.zip |
Diffstat (limited to 'g4f/requests/raise_for_status.py')
-rw-r--r-- | g4f/requests/raise_for_status.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/requests/raise_for_status.py b/g4f/requests/raise_for_status.py index 0e91505e..1699d9a4 100644 --- a/g4f/requests/raise_for_status.py +++ b/g4f/requests/raise_for_status.py @@ -11,6 +11,8 @@ class CloudflareError(ResponseStatusError): ... def is_cloudflare(text: str) -> bool: + if "<title>Attention Required! | Cloudflare</title>" in text: + return True return '<div id="cf-please-wait">' in text or "<title>Just a moment...</title>" in text def is_openai(text: str) -> bool: |