Getting a 403 Forbidden error with my Python website crawler – how to fix it? or Why is my Python web

16 Replies, 1781 Views

Dude, I feel you. Ran into this last week.

Some sites just hate scrapers lol. Try adding more headers like:

```python
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)',
'Accept-Encoding': 'gzip, deflate',
'Connection': 'keep-alive'
}
```

If that fails, yeah, proxies or maybe even a VPN.

Messages In This Thread



Users browsing this thread: 1 Guest(s)