I know that some of you already wrote about this problem, but after all atempts nothing works for me. So when I try to scrape web page (https://www.askgamblers.com/) I get 403 error. I already tried:
- Changing to difrend request modes (GET, POST, HEAD)
- Different User-Agent (I copy the same User-Agent that i found in dev console in Chrome)
- Putting more params in header (i copy whole header that i found in dev console)
- Using session
And still nothing works for me. What could try next. Did i miss something? What would you do in this case? You can also check my code with only user agent in header.
url = "https://www.askgamblers.com/"
page = requests.get(url, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36'})
print(page.status_code)
I am using the latest version of requests libary (2.26.0)
This is my first post, so be gentle on me :)
EDIT:
My problem was solved with this help: https://stackoverflow.com/a/61379638/17637402