From 3fbdb90fdebc15d53142a2a2284089788904a74e Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 21 May 2012 00:27:03 +0200 Subject: [PATCH] Handle 404s --- 4c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/4c b/4c index a0efd04..79d5535 100755 --- a/4c +++ b/4c @@ -20,6 +20,9 @@ try: except ValueError: print "That does not look like a valid URL." exit(1) +except urllib2.HTTPError: + print "The given URL returns a HTTP 404 status code - the thread may have died." + exit(1) if options['newdir'] == True: thread_id = url.split('/')[-1]