add headless param
This commit is contained in:
@@ -19,7 +19,7 @@ logger.addHandler(logging.StreamHandler(stream=sys.stdout))
|
||||
|
||||
|
||||
def start_book(start_number, end_number, store_choose_state=0, max_workers=10, proxy_type=ProxyType.BRIGHT_DATA,
|
||||
mode: ModeEnum = ModeEnum.MANUAL):
|
||||
mode: ModeEnum = ModeEnum.MANUAL, headless=False):
|
||||
# read the contact, and contact the 2 objects together
|
||||
excel_reader = ExcelHelper()
|
||||
all_contacts = excel_reader.read_contacts()
|
||||
@@ -33,7 +33,7 @@ def start_book(start_number, end_number, store_choose_state=0, max_workers=10, p
|
||||
if can_send_request(contact):
|
||||
executor.submit(
|
||||
CommandorPage(contact, store_type=store_choose_state, proxy_type=proxy_type, mode=mode).start_page,
|
||||
proxy)
|
||||
proxy, headless=headless)
|
||||
else:
|
||||
logger.info("do not send request --> skip")
|
||||
|
||||
@@ -60,5 +60,5 @@ def get_proxy(proxy_type=ProxyType.BRIGHT_DATA):
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 修改联系人行,结束联系人行 第三个参数store等于0的时候是随机,传入1的时候是总店
|
||||
start_book(616, 616, store_choose_state=1, mode=ModeEnum.AUTOMATIC)
|
||||
start_book(616, 616, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=True)
|
||||
# recheck_the_captcha_error_contacts(store_type=0, mode=ModeEnum.AUTOMATIC, on_no_contact_found=lambda: None)
|
||||
|
||||
Reference in New Issue
Block a user