notablackbear / poe_qolV2

52 stars 34 forks source link

CloudFlare Issue #82

Open zakaoai opened 3 years ago

zakaoai commented 3 years ago

Hello there, I dont know why but I bump into cloudflare ban IP from path of exile. Is there a way to dont get this ban ?

zakaoai commented 3 years ago

Okey fixed the V3 python script using cloudscraper. Will submit a PR when I will have time

Mettwurstler commented 3 years ago

hey, i wrote the V3 script and I recognised the problem too, but dont have much time atm for fixing.. can you give me your solution, then I will integrate it in my actual version and update it :)

zakaoai commented 3 years ago
import cloudscraper

            scraper = cloudscraper.create_scraper()
            a = scraper.get(stash_tab, cookies=dict(
                POESESSID=POESESSID), params=payload)
Mettwurstler commented 3 years ago

nice, I will try it, ty :)

Mettwurstler commented 3 years ago

it works great, ty for your help :) I will upload the newest version on my fork :)

Mettwurstler commented 3 years ago

tried converting to .exe, but pyinstaller doesn't seems to like cloudscraper :/ the .py file works fine in pycharm. the .exe is running too, but dont read the api :( i will try to fix this, but no clue atm xD

zakaoai commented 3 years ago

Same, I run the .py file. I didn't try convert to .exe atm. Hope you'll find it someday. Also the imported V3 file has a lot of TODO. First time I code in Python so I don't rush onto them but maybe later I'll help. Seem like highlight box have some lag when they appear. Maybe some optimization to do on this.

Mettwurstler commented 3 years ago

I hope too :D yes it was my first touch with python ever, so its far away from perfect i think xD I never had lag problems with the highlights, but I will check this :) but when it runs at least as .py its fine in the first step :)

Mettwurstler commented 3 years ago

hey, I finally got it. I used cfscrape instead of cloudscraper and everything worked fine. I uploaded the .exe (and rest) on my fork :)

zakaoai commented 3 years ago

Push them when you're done ;) I hesitate between both cfscrape and cloudscraper. Well if they both work with cloudfare that's good. I will continue with the .py for my usage.