2to3port #2
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
import sys, os
|
||||
|
||||
__version__ = '0.1'
|
||||
__version__ = '0.2'
|
||||
|
||||
setup(name='whois',
|
||||
version=__version__,
|
||||
|
||||
@ -12,9 +12,9 @@ import socket
|
||||
import re
|
||||
import logging
|
||||
import urllib
|
||||
import urllib2
|
||||
#import urllib2
|
||||
|
||||
import error
|
||||
#import errormyhost
|
||||
import flags
|
||||
|
||||
class Whois(object):
|
||||
@ -61,13 +61,13 @@ class Whois(object):
|
||||
|
||||
if self.settings.get("http-method").lower() == "post":
|
||||
logging.debug("sendHTTPQuery: Connecting to whois server using POST")
|
||||
req = urllib2.Request(whoisServer, param)
|
||||
req = urllib.Request(whoisServer, param)
|
||||
else: # GET
|
||||
logging.debug("sendHTTPQuery: Connecting to whois server using GET")
|
||||
req = urllib2.Request((whoisServer.endswith("?") and whoisServer or whoisServer+"?") + param)
|
||||
req = urllib.Request((whoisServer.endswith("?") and whoisServer or whoisServer+"?") + param)
|
||||
|
||||
data = urllib2.urlopen(req).read()
|
||||
print data
|
||||
data = urllib.urlopen(req).read()
|
||||
print(data)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user