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/114.0.0.0 Mobile Safari/537.36"}
url = "https://api.bloxflip.com/chat/history"
webhook = Webhook("***")
scraper = cs.create_scraper()
while True:
rain_active = False
if rain_active == False:
res = scraper.get(url,headers=headers)
res.raise_for_status()
print(res.raise_for_status())
res = res.json()['rain']
print(res)
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](https://bloxflip.com)')
em.set_timestamp
webhook.send("@everyone rain notif")
webhook.send(embed=em)
time.sleep(140)
rain_active = True
else:
time.sleep(1)
rain_active = False