Ejemplo n.º 1
0
 def __init__(self, webKitDir=webKitDir):
     Adapter.__init__(self, webKitDir)
     if sys.platform == 'win32':
         import msvcrt
         msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
         msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
     # Get Host and Port information for WebKit AppServer
     (self.host, self.port) = open(os.path.join(self._webKitDir, 'adapter.address')).read().split(':')
     self.port = int(self.port)
Ejemplo n.º 2
0
	def __init__(self, webkitdir):
		Adapter.__init__(self, webkitdir)
		if sys.platform == 'win32':
			import msvcrt
			msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
			msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)		

		# Get Host and Port information for WebKit AppServer
		(self.host, self.port) = string.split(open(os.path.join(self._webKitDir, 'address.text')).read(), ':')
		self.port = int(self.port)
Ejemplo n.º 3
0
 def __init__(self, searchString, category, maxEntries):
     """
     Initialize the RarBg adapter
     """
     Adapter.__init__(self, searchString, category, maxEntries)
     self._logger = logging.getLogger(__name__)
     self._defHeaders = {
         'accept': '''text/html,application/xhtml+xml,application/xml;q=0.9,
         image/webp,*/*;q=0.8''',
         'accept-encoding': 'deflate',
         'accept-language': 'en-US,en;q=0.8',
         'user-agent': '''Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
         (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36'''}
Ejemplo n.º 4
0
 def __init__(self, searchString, category, maxEntries):
     """
     Initialize the RarBg adapter
     """
     Adapter.__init__(self, searchString, category, maxEntries)
     self._logger = logging.getLogger(__name__)
     self._defHeaders = {
         'accept':
         '''text/html,application/xhtml+xml,application/xml;q=0.9,
         image/webp,*/*;q=0.8''',
         'accept-encoding':
         'deflate',
         'accept-language':
         'en-US,en;q=0.8',
         'user-agent':
         '''Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
         (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36'''
     }
Ejemplo n.º 5
0
 def __init__(self, host, port, webKitDir):
     Adapter.__init__(self, webKitDir)
     self.host = host
     self.port = port
Ejemplo n.º 6
0
 def __init__(self):
     Adapter.__init__(self)
Ejemplo n.º 7
0
 def __init__(self, host, port, webKitDir):
     Adapter.__init__(self, webKitDir)
     self.host = host
     self.port = port