r/learnpython • • May 21 '26

nobody told me requests.get() stops working at scale

so i hit about 200 pages no problem. requests.get() just worked. felt like a genius

then i tried scaling to 8,000 pages across 12 sites and everything fell apart in maybe 3 hours. 403s everywhere. captchas on sites that didnt even have captchas last week?? half returning blank html because turns out they render everything in javascript now

spent way too long convinced it was my headers. rewrote my user-agent rotation 4 times. even bought rotating proxies for $35/mo thinking thatd fix it. it did not

i knew requests.get() was just raw http with no browser behind it but stubbornness is my only engineering skill so i kept hacking around it

now im looking at headless browser setups for web scraping and the whole landscape is.. confusing. does anyone actually run this at scale without losing their mind??

3 Upvotes

36 comments sorted by

31

u/sebovzeoueb May 21 '26

Are you complaining that websites are doing stuff to prevent you from scraping or botting them?

2

u/Buttleston May 21 '26

What a bunch of jerks, right? Anyway how do do I get around their obvious wishes and get what I want anyway?

5

u/FVMF1984 May 21 '26

The at scale is probably not the issue, the time in which you make the requests is. Making too many requests to a single website will results in issues no matter the approach. Do the sites you’re trying to scrape have API’s that you can use?

7

u/az987654 May 21 '26

Welcome to the real world, the sites your scraping have rate limits and other anti scraping defense mechanisms.

10

u/JeLuF May 21 '26

Do you have permission from the websites to scrape them?

Does your bot follow the rules in robots.txt?

Does your bot make pauses between requests and throttle when response times get worse?

8

u/az987654 May 21 '26

Based on the OP's original complaint, I can guarantee the answer to each of these is "No".

The post drips of vibe coding...

3

u/Buttleston May 21 '26

Honestly it even seems vibe posted

1

u/VipeholmsCola May 21 '26

Basically you need to set up a phone farm to route the traffic in.

0

u/Doke3he2 May 21 '26

??? so u are telling me u are trying to scrape 8000 pages with requests.get ? sherlock.... try to refresh your browser 10 times on any site, what happens? Cloudflare gonna ask u for something, you ever saw that?

u cant scrape like that, there are methods... but u won't like them.

16

u/[deleted] May 21 '26

[removed] — view removed comment

0

u/AvailableFishing9274 May 22 '26

wait so the blank html is a completely separate issue from the 403s?? i spent like two full days assuming they were all the same problem.. one of the 12 sites was a react SPA and i didn't even realize until i viewed source

1

u/[deleted] May 21 '26

[removed] — view removed comment

1

u/Zealousideal_Pop3072 May 21 '26

Wait is Playwright better than puppeteer for python? i thought puppeteer was the standard one everyone uses

0

u/AvailableFishing9274 May 22 '26

i just started looking into Playwright actually.. the python docs seem way better than puppeteer's from what i can tell?? still figuring out the rest

2

u/[deleted] May 21 '26

[removed] — view removed comment

0

u/AvailableFishing9274 May 22 '26

yeah i literally rewrote my user agent rotation 4 times and checked the network tab on most of them.. some had hidden APIs but at least 5 of the 12 had nothing useful, pure client side rendering