diff --git a/HTTPy.py b/HTTPy.py index a92b7f6..a48045d 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -12,17 +12,24 @@ class MyHTMLParser(HTMLParser): global conf_temp global starttag if tag == conf_temp: +# starttag = tag for name, value in attrs: if name == "class" and value == "df-raw": print tag - starttag = tag - pass + starttag = tag + # pass #print starttag + + def handle_endtag(self, tag): + global starttag + if tag == "pre": + starttag = "" + def handle_data(self, data): #print starttag if starttag == conf_temp: print data - pass + conn = httplib.HTTPSConnection("www.whois.com")