def initialize(self): """ Start threads to get proxies :return: Array list proxies """ self.log('Looking at aliveproxy.com...', flush=True) results = [] threads = [ Threading(target=self.get, args=('high-anonymity-proxy-list/', )), Threading(target=self.get, args=('anonymous-proxy-list/', )), Threading(target=self.get, args=('transparent-proxy-list/', )) ] for thread in threads: thread.start() try: for thread in threads: results.append(thread.wait()) except KeyboardInterrupt: self.log('Ctrl-C caught, exiting', 'WARNING', True) sys.exit(1) result = [x for i in results for x in i] self.log('Total at aliveproxy.com: \033[93m{}'.format(len(result))) return [x for i in results for x in i]
def initialize(self): """ Start threads to get proxies :return: Array list proxies """ self.log('Looking at proxyhttp.net...', flush=True) results = [] threads = [] pages = self.pages() for page in pages: threads.append(Threading(target=self.get, args=(page, ))) for thread in threads: thread.start() try: for thread in threads: results.append(thread.wait()) except KeyboardInterrupt: self.log('Ctrl-C caught, exiting', 'WARNING', True) sys.exit(1) result = [x for i in results for x in i] self.log('Total at proxyhttp.net: \033[93m{}'.format(len(result))) return result
def start_proxy_checker(self): """ Start threads to check proxies :return: """ threads = [] results = [] if len(self.proxies) >= 100: proxies = (self.proxies[i:i + len(self.proxies) // 100] for i in range(0, len(self.proxies), len(self.proxies) // 100)) else: proxies = (self.proxies[i:i + len(self.proxies) // 10] for i in range(0, len(self.proxies), len(self.proxies) // 10)) for pxs in proxies: threads.append(Threading(target=self.checker, args=(pxs,))) for thread in threads: thread.start() try: for thread in threads: results.append(thread.wait()) except KeyboardInterrupt: sys.exit("Ctrl-C caught, exiting") result = [x for i in results for x in i] self.save_proxy(result) self.log('Total Working Proxies: \033[93m{}'.format(len(result)))
def initialize(self): """ Start thread to get proxies :return: Array list proxies """ self.log('Looking at proxynova.com...', flush=True) results = [] threads = [] countries = self.countries() countries_per_threads = (countries[i:i + 30] for i in range(0, len(countries), 30)) for cts in countries_per_threads: threads.append(Threading(target=self.get, args=(cts, ))) for thread in threads: thread.start() try: for thread in threads: results.append(thread.wait()) except KeyboardInterrupt: self.log('Ctrl-C caught, exiting', 'WARNING', True) sys.exit(1) result = [x for i in results for x in i] self.log('Total at proxynova.com: \033[93m{}'.format(len(result))) return result
def initialize(self): """ Start thread to get proxies :return: Array list proxies """ self.log('Looking at proxy-ip-list.com...', flush=True) thread = Threading(target=self.get) thread.start() try: result = thread.wait() except KeyboardInterrupt: self.log('Ctrl-C caught, exiting', 'WARNING', True) sys.exit(1) self.log('Total at proxy-ip-list.com: \033[93m{}'.format(len(result))) return result
def initialize(self): """ Start threads to get proxies :return: Array list proxies """ self.log('Looking at gatherproxy.com...', flush=True) results = [] threads = [] proxy_types = ['elite', 'anonymous', 'transparent'] for proxy_type in proxy_types: pages = self.pages(proxy_type) pages_per_threads = (pages[i:i + 20] for i in range(0, len(pages), 20)) for pgs in pages_per_threads: threads.append( Threading(target=self.get, args=( proxy_type, pgs, ))) for thread in threads: thread.start() try: for thread in threads: results.append(thread.wait()) except KeyboardInterrupt: self.log('Ctrl-C caught, exiting', 'WARNING', True) sys.exit(1) result = [x for i in results for x in i] self.log('Total at gatherproxy.com: \033[93m{}'.format(len(result))) return result
def initialize(self): """ Start threads to get proxies :return: Array list proxies """ self.log('Looking at freeproxylists.com...', flush=True) results = [] pages = [ 'elite.html', 'anonymous.html', 'non-anonymous.html', 'https.html', 'standard.html', 'us.html', 'uk.html', 'ca.html', 'fr.html' ] for page in pages: threads = [] links = self.pages(page) links_per_threads = (links[i:i + 5] for i in range(0, len(links), 5)) for lks in links_per_threads: threads.append(Threading(target=self.get, args=(lks, ))) for thread in threads: thread.start() try: for thread in threads: results.append(thread.wait()) except KeyboardInterrupt: self.log('Ctrl-C caught, exiting', 'WARNING', True) sys.exit(1) result = [x for i in results for x in i] self.log('Total at freeproxylists.com: \033[93m{}'.format(len(result))) return result