Hey everyone,
So I’m trying to figure out how to use python get url ignore 404 errors. Like, I’m scraping some pages, and some links just don’t exist, ya know? I don’t want my script to crash every time it hits a 404.
I’ve tried using `requests.get()` but it throws an exception when it hits a 404. Is there a way to just skip those and keep going? Maybe something like a try-except block? Or is there a cleaner way?
Also, if anyone has a snippet or example for python get url ignore 404, that’d be super helpful.
Thanks in advance! 🙏
(btw, sorry if this has been asked before, I did a quick search but couldn’t find exactly what I needed.)
So I’m trying to figure out how to use python get url ignore 404 errors. Like, I’m scraping some pages, and some links just don’t exist, ya know? I don’t want my script to crash every time it hits a 404.
I’ve tried using `requests.get()` but it throws an exception when it hits a 404. Is there a way to just skip those and keep going? Maybe something like a try-except block? Or is there a cleaner way?
Also, if anyone has a snippet or example for python get url ignore 404, that’d be super helpful.
Thanks in advance! 🙏
(btw, sorry if this has been asked before, I did a quick search but couldn’t find exactly what I needed.)
