In the Kodi addon, the request always returns 403, even after setting headers



Device: Windows, Android
Kodi version: 21.0.0
Requests version: 2.31.0

I use requests to get web pages and attempt to bypass Cloudflare verification by setting headers. The code is as follows:

Quote:requests.get(“https://ddys.pro”,headers={“User-Agent”:”Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0″,”Cookie”:”X_CACHE_KEY=acb097992b92ab24fc7ddf604c46f77e; cf_clearance=6A2OzzXdNvxxqZd1M2b3w05xGv.62jIg6AfmIX8ew1Q-1713403239-1.0.1.1-AkhJ3yB_wNx2Sh.RRkV3irxjjrdXMmoRbC4LXXF6UrTwZBSpzckxif1i57jun7.xErZ_0waGK5JgcrtgRM1gGw; __cf_bm=tiemtpKjomxGMQfjCZf6T4sdqMvFMabBI5pl1pAnbGU-1713403238-1.0.1.1-eotvanZiYm7QrOY5kkCN162mVwFHi5jMbBGJ6NdBUMihqT8.e1Da1bF6UCo4edHO7Wpo44lGlHzqVl69yUBiDw”})

The same code, when run in Python in PowerShell, returns a status code of 200. However, in the Kodi, the status code always remains 403.