summaryrefslogtreecommitdiffstats
path: root/g4f/requests
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-11-20 02:42:15 +0100
committerGitHub <noreply@github.com>2024-11-20 02:42:15 +0100
commit419264f9665ed50ac0dcbf86327da8bf221ac3e8 (patch)
tree027ebe8efcb413b648101ac6fd4fe744803e8a8a /g4f/requests
parentMerge pull request #2387 from hlohaus/info (diff)
parentFix missing provider_handler in client (diff)
downloadgpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.gz
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.bz2
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.lz
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.xz
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.zst
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.zip
Diffstat (limited to 'g4f/requests')
-rw-r--r--g4f/requests/raise_for_status.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/g4f/requests/raise_for_status.py b/g4f/requests/raise_for_status.py
index fe262f34..8625f552 100644
--- a/g4f/requests/raise_for_status.py
+++ b/g4f/requests/raise_for_status.py
@@ -11,7 +11,9 @@ class CloudflareError(ResponseStatusError):
...
def is_cloudflare(text: str) -> bool:
- if "<title>Attention Required! | Cloudflare</title>" in text or 'id="cf-cloudflare-status"' in text:
+ if "Generated by cloudfront" in text:
+ return True
+ elif "<title>Attention Required! | Cloudflare</title>" in text or 'id="cf-cloudflare-status"' in text:
return True
return '<div id="cf-please-wait">' in text or "<title>Just a moment...</title>" in text