Skip to content

Instantly share code, notes, and snippets.

@luanlmd
Created December 2, 2013 17:30
Show Gist options
  • Save luanlmd/7753152 to your computer and use it in GitHub Desktop.
Save luanlmd/7753152 to your computer and use it in GitHub Desktop.
import urllib
from threading import Thread
class Derruba(Thread):
def __init__(self, url):
Thread.__init__(self)
self.url = url
def run(self):
print "Abrindo " + self.url
urllib.urlopen(self.url)
while 1:
try:
d = Derruba("http://example.com")
d.start()
except Exception, ex:
raise ex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment