Commit 1a4197c8 authored by wang's avatar wang

1

parent e8e39043
......@@ -50,32 +50,37 @@ def add_header(headers: dict, cookies: dict, px: str, thread_id=0):
def exec(thread_id):
id_ = uuid.uuid4().hex
try:
px = get_proxy()['url']
cf = Reese84ByPass(target="https://www.flyscoot.com/", proxy=px, thread_name=f'{thread_id}')
headers, cookies = cf.start()
# cf.test()
add_header(headers, cookies, px, thread_id)
# except json.decoder.JSONDecodeError:
# print('json huoqu shibai ')
except Exception as e:
print(e)
traceback.print_exc()
def run():
brush_thread = 2
while True:
print(f'本次并发数 {brush_thread}')
id_ = uuid.uuid4().hex
pull = check_pull()
try:
if pull.get('status') == 1:
print('休眠十秒')
time.sleep(10)
continue
except:
pass
try:
px = get_proxy()['url']
cf = Reese84ByPass(target="https://www.flyscoot.com/", proxy=px, thread_name=f'{thread_id}')
headers, cookies = cf.start()
# cf.test()
add_header(headers, cookies, px, thread_id)
# except json.decoder.JSONDecodeError:
# print('json huoqu shibai ')
except Exception as e:
print(e)
traceback.print_exc()
def run():
brush_thread = 2
while True:
print(f'本次并发数 {brush_thread}')
# pool = ThreadPoolExecutor(max_workers=brush_thread)
# all_task = [pool.submit(exec, (i)) for i in range(brush_group)]
# brush_check = CONFIG['internal']['reverse']['making']['brush_check']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment