def search(self, what, cat="all"): """ Performs search """ connection = http("www.mininova.org") query = "/".join(("/search", what, self.supported_categories[cat], "seeds")) connection.request("GET", query) response = connection.getresponse() if response.status != 200: return list_searches = [] parser = self.MyHtmlParseWithBlackJack(list_searches, self.url) parser.feed(response.read().decode('utf-8')) parser.close() parser.next_queries = False for search_query in list_searches: connection.request("GET", search_query) response = connection.getresponse() parser.feed(response.read().decode('utf-8')) parser.close() connection.close() return
def search(self, what, cat="all"): """ Performs search """ connection = http("www.mininova.org") query = "/".join( ("/search", what, self.supported_categories[cat], "seeds")) connection.request("GET", query) response = connection.getresponse() if response.status != 200: return list_searches = [] parser = self.MyHtmlParseWithBlackJack(list_searches, self.url) parser.feed(response.read().decode('utf-8')) parser.close() parser.next_queries = False for search_query in list_searches: connection.request("GET", search_query) response = connection.getresponse() parser.feed(response.read().decode('utf-8')) parser.close() connection.close() return
def search(self, what, cat="all"): """ Performs search """ connection = http("extratorrent.cc") query = "".join(("/advanced_search/?with=", what, "&s_cat=", self.supported_categories[cat])) connection.request("GET", query) response = connection.getresponse() if response.status != 200: return list_searches = [] parser = self.MyHtmlParseWithBlackJack(list_searches, self.url) parser.feed(response.read().decode('utf-8')) parser.close() for search_query in list_searches: connection.request("GET", search_query) response = connection.getresponse() parser.feed(response.read().decode('utf-8')) parser.close() connection.close() return
def search(self, what, cat="all"): """ Performs search """ connection = http("extratorrent.cc") query = "".join(("/search/?new=1&search=", what, "&s_cat=", self.supported_categories[cat])) connection.request("GET", query) response = connection.getresponse() if response.status != 200: return list_searches = [] parser = self.MyHtmlParseWithBlackJack(list_searches, self.url) parser.feed(response.read().decode('utf-8')) parser.close() for search_query in list_searches: connection.request("GET", search_query) response = connection.getresponse() parser.feed(response.read().decode('utf-8')) parser.close() connection.close() return
def connect(): c1 = http("pcrfclient01") c2 = http("pcrfclient02") return c1, c2