리눅스 환경에서 디버깅
This commit is contained in:
0
Crawler/Crawler.py
Normal file → Executable file
0
Crawler/Crawler.py
Normal file → Executable file
2
Crawler/ProxyHandler.py
Normal file → Executable file
2
Crawler/ProxyHandler.py
Normal file → Executable file
@@ -29,7 +29,7 @@ class ProxyHandler:
|
||||
def check_proxy_all(self, proxies, check_url):
|
||||
Logger.log('checking proxies for {}'.format(check_url))
|
||||
|
||||
worker_cnt = 64
|
||||
worker_cnt = 16
|
||||
pool = concurrent.futures.ThreadPoolExecutor(worker_cnt)
|
||||
[pool.submit(self.check_proxy, proxy, check_url) for proxy in proxies]
|
||||
pool.shutdown()
|
||||
|
||||
4
Crawler/Setting.py
Normal file → Executable file
4
Crawler/Setting.py
Normal file → Executable file
@@ -51,8 +51,8 @@ class Setting:
|
||||
if 'download_path' not in self.settings:
|
||||
self.settings['download_path'] = '.'
|
||||
|
||||
if self.settings['download_path'][-1] != '\\':
|
||||
self.settings['download_path'] += '\\'
|
||||
if self.settings['download_path'][-1] != '/':
|
||||
self.settings['download_path'] += '/'
|
||||
|
||||
if not os.path.exists(self.settings['download_path']):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user