]> jfr.im git - erebus.git/commitdiff
temp fix
authorConny Sjöblom <redacted>
Wed, 19 Feb 2014 22:36:51 +0000 (00:36 +0200)
committerConny Sjöblom <redacted>
Wed, 19 Feb 2014 22:36:51 +0000 (00:36 +0200)
modules/urls.py

index 4a1f5f31dbecf98ed82eb230226719591d07f3ba..5fc10a8c7c48a53b8906cdad0092bda1b5be0cb0 100644 (file)
@@ -149,5 +149,8 @@ def gottwitch(uri):
                        return 'Twitch: Channel offline.'
 
 def goturl(url):
-       soup = BeautifulSoup(urllib2.urlopen(url))
-       return soup.title.string
\ No newline at end of file
+       try:
+               soup = BeautifulSoup(urllib2.urlopen(url))
+               return soup.title.string
+       except:
+               return "Bad URL"
\ No newline at end of file