---
title: "Comment by OnlineProxy on \"Getting 403s in Production? A Developer’s Proxy Guide\" | Hashnode"
description: "the example picks a random proxy every time, so a dead or banned IP keeps coming back. tracking failures per proxy and pulling one out after a few 403s in a row"
url: "https://hashnode.com/posts/getting-403s-in-production-a-developer-s-proxy-guide/6af1ec5640651d1a0fa8bd6b/comment/6af4f9366e1a3181eac6fbf8"
---

[Discussion](https://hashnode.com/posts/getting-403s-in-production-a-developer-s-proxy-guide/6af1ec5640651d1a0fa8bd6b)

Comment [Getting 403s in Production? A Developer’s Proxy Guide](https://hashnode.com/posts/getting-403s-in-production-a-developer-s-proxy-guide/6af1ec5640651d1a0fa8bd6b)

[OnlineProxy](https://hashnode.com/@onlineproxyio)

[Nov 11](https://hashnode.com/posts/getting-403s-in-production-a-developer-s-proxy-guide/6af1ec5640651d1a0fa8bd6b/comment/6af4f9366e1a3181eac6fbf8)

the example picks a random proxy every time, so a dead or banned IP keeps coming back. tracking failures per proxy and pulling one out after a few 403s in a row would fix that. if you’re seeing 403s from a proxy you don’t control, the same logic applies to rotating exit IPs

checking the body for expected page content beats trusting a 200, since some setups serve challenge or block pages with a 200 status. unlike 403 pages, soft blocks come back as 200, so the status code alone won’t catch them

[Harsh Raval](https://hashnode.com/@harshravaldj)

[Nov 12](https://hashnode.com/posts/getting-403s-in-production-a-developer-s-proxy-guide/6af1ec5640651d1a0fa8bd6b/comment/6af4f9366e1a3181eac6fbf8#reply-6af543af2045aec4dad0ea0d)

Good catch, thanks. The example uses random.choice to keep the code short, so a banned IP can keep coming back. I mention per-proxy tracking in the notes, but the code doesn’t implement it. Counting consecutive 403s per proxy and benching an IP for a cooldown after 3 or so is the right fix, and it applies the same way to rotating exit IPs you don’t control.

You’re also right about soft blocks. The post covers challenge pages that come back as 403, but a 200 with a block or challenge page gets past a status-only check. Validating the body (an expected selector or marker, a minimum length, no “just a moment” or captcha strings) is a more reliable success signal than the status code. I’ll add both to the post with an updated snippet.
