Python cloudscraper bug

Yoo my code is getting 403 client error when i run it on different site it works but in replit it doesn’t it will be a great thing if u fix it
The code

import json
import cloudscraper as cs
from dhooks import Webhook, Embed
import time
from time import sleep

headers = {"User-Agent" : "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Mobile Safari/537.36"}

url = ""
webhook = Webhook("***")

scraper = cs.create_scraper()
while True:
    rain_active = False
    if rain_active == False:
        res = scraper.get(url,headers=headers)
        res = res.json()['rain']
        if res['active'] == True:
            prize = res['prize']
            host = res['host']
            em = Embed(color=0x0025ff, timestamp='now')
            em.add_field(name='Rain notif!', value=f' active rain \nhost: {host} \nprize:${prize} \n[click to join rain](')
            webhook.send("@everyone rain notif")
            rain_active = True
            rain_active = False

1 Like

rate limit probably.

1 Like

did you find a solution? i have the same problem!

The scraper has been patched. Cloudflare has recently undertaken a substantial overhaul of their systems. This includes the implementation of robust security measures such as the introduction of new captchas, among other modifications.

Regrettably, unless you manage to find a newly designed scraper tailored to interact successfully with this updated Cloudflare interface, your efforts will hit a wall. In such an event, your alternatives will dwindle, necessitating the adoption of a different strategy altogether.

1 Like