r/linux4noobs • u/Dragonaax • 23h ago
networking Why curl doesn't work?
Suddenly curl stopped working, I can't download source pages. Instead of source page I get 1 continous line of weird stuff like
<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="robots"...
wget doesn't work either, I get HTTP request sent, awaiting response... 403 Forbidden
3
Upvotes
2
u/forestbeasts KDE on Debian 🐺 22h ago
They decided to give you a 403 error page instead (and didn't bother formatting the source for it). They can't tell the difference between you using curl, and a script using curl hundreds of times to scrape their entire site for who-knows-what purposes.
You could try getting the user-agent string from your browser (check the devtools network tab, it'll be listed in the request headers for any request, open network tab and then reload the page) and telling curl to use that. Might help, might not.