dickserv

- irc bot with many useful commands
git clone git://git.acid.vegas/dickserv.git
Log | Files | Refs | Archive | README | LICENSE

isup.py (440B)

      1 #!/usr/bin/env python
      2 # DickServ IRC Bot - Developed by acidvegas in Python (https://acid.vegas/dickserv)
      3 # isup.py
      4 
      5 import httplib
      6 
      7 def check(url):
      8     source = httplib.get_source('http://isup.me/' + url)
      9     if source.find('It\'s just you.') != -1:
     10         return 'UP'
     11     elif source.find('It\'s not just you!') != -1:
     12         return 'DOWN'
     13     elif source.find('Huh?') != -1:
     14         return 'INVALID'
     15     else:
     16         return 'UNKNOWN'