Buckets:
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "90b0548a-a379-4a48-87a3-2a3e979f0711", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import requests\n", | |
| "\n", | |
| "session = requests.Session()\n", | |
| "session.headers.update({\n", | |
| " \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36\",\n", | |
| " \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\",\n", | |
| " \"Accept-Language\": \"en-US,en;q=0.5\",\n", | |
| " \"Accept-Encoding\": \"gzip, deflate, br\",\n", | |
| " \"Connection\": \"keep-alive\",\n", | |
| "})\n", | |
| "\n", | |
| "response = session.get(\"https://new3.gdflix.io\", timeout=10)\n", | |
| "print(f\"Status Code: {response.status_code}\")\n", | |
| "\n", | |
| "# try:\n", | |
| "# # Set a reasonable timeout (e.g., 10 seconds)\n", | |
| "# response = requests.get(url, headers=headers, timeout=10, allow_redirects=True)\n", | |
| "# status = response.status_code\n", | |
| "\n", | |
| "# print(f\"URL: {url}\")\n", | |
| "# print(f\"Status Code: {status}\\n\")\n", | |
| "\n", | |
| "# if status == 200:\n", | |
| "# print(\"SUCCESS: You have full access to the website.\")\n", | |
| "# elif status == 403:\n", | |
| "# print(\"BLOCKED (403 Forbidden): Your IP or request signature is likely blocked by the server or Web Application Firewall (WAF).\")\n", | |
| "# elif status == 429:\n", | |
| "# print(\"RATE LIMITED (429 Too Many Requests): Your IP is temporarily blocked due to sending too many requests.\")\n", | |
| "# elif status == 503:\n", | |
| "# print(\"ACCESS RESTRICTED (503): Likely hit a Cloudflare/Incapsula anti-bot challenge or server overload.\")\n", | |
| "# else:\n", | |
| "# print(f\"UNEXPECTED RESPONSE: The server returned status code {status}.\")\n", | |
| "\n", | |
| "# except requests.exceptions.ConnectTimeout:\n", | |
| "# print(\"TIMEOUT: Connection timed out. Your IP might be firewalled/dropped at the network level, or the server is down.\")\n", | |
| "# except requests.exceptions.SSLError:\n", | |
| "# print(\"SSL ERROR: SSL handshake failed.\")\n", | |
| "# except requests.exceptions.ConnectionError:\n", | |
| "# print(\"CONNECTION ERROR: Could not connect to the host. The site may be down, or your IP/DNS is completely blocked.\")\n", | |
| "# except requests.exceptions.RequestException as e:\n", | |
| "# print(f\"AN ERROR OCCURRED: {e}\")\n", | |
| "\n", | |
| "# # Example Usage\n", | |
| "# check_website_access(\"https://new3.gdflix.io\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "f34990f4-a042-41b3-8cf5-ffcbb7f5a53f", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "!pip install curl_cffi" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 7, | |
| "id": "d66481e2-1ceb-4bdb-84a3-b4fdfc7a411c", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Status Code: 200\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "from curl_cffi import requests\n", | |
| "\n", | |
| "# impersonate=\"chrome120\" mimics a real Chrome browser's exact TLS fingerprint\n", | |
| "response = requests.get(\n", | |
| " \"https://new3.gdflix.io\", \n", | |
| " impersonate=\"chrome120\", \n", | |
| " timeout=10\n", | |
| ")\n", | |
| "\n", | |
| "print(f\"Status Code: {response.status_code}\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "2445c7c9-64fa-4395-beb9-0cd11f6890ce", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python 3 (ipykernel)", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.12.4" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } | |
Xet Storage Details
- Size:
- 4.17 kB
- Xet hash:
- 2080d0a3c7fc5ee1b49aee039c7479634dd41bc4899c81fb8f9dbb7ed6755d85
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.