make store parametrable

This commit is contained in:
2022-04-25 09:21:46 +02:00
parent d72a1ec631
commit 5748572cb5
3 changed files with 20 additions and 14 deletions
+4 -3
View File
@@ -60,7 +60,7 @@ def init_modems() -> list:
return modems
def start_book(start_slot_number, end_slot_number):
def start_book(start_slot_number, end_slot_number, store=0):
slot_list = list(range(start_slot_number, end_slot_number + 1))
random.shuffle(slot_list)
for i in slot_list:
@@ -101,7 +101,7 @@ def start_book(start_slot_number, end_slot_number):
logger.info("信号强度: " + str(signal))
proxy = get_proxy(modem.phone_number)
commandor = CommandorPage(modem, sim_position=current_sim_position,
slot_position=current_card_pool_slot)
slot_position=current_card_pool_slot, store_type=store)
# start the task in thread
executor.submit(commandor.start_page, proxy)
except Exception as error:
@@ -123,4 +123,5 @@ def get_proxy(phone_number):
if __name__ == '__main__':
# 修改起始行,结束行
start_book(32, 32)
# 第三个参数store等于0的时候是随机,传入1的时候是总店
start_book(32, 32, store=0)