@@ -118,6 +118,12 @@ def report(user_index, try_times):
118
118
in_shanghai .click ()
119
119
time .sleep (0.5 )
120
120
121
+ # Vaccination Time
122
+ script = "document.getElementById('p1_JieZSJ-inputEl').value = " + \
123
+ "'" + config .users [user_index ]['vaccination_time' ].strip () + "'"
124
+ browser .execute_script (script )
125
+ time .sleep (0.5 )
126
+
121
127
# Submit
122
128
submit_button = browser .find_element (By .ID , 'p1_ctl00' ) \
123
129
.find_element (By .ID , 'p1_ctl00_btnSubmit' )
@@ -128,8 +134,8 @@ def report(user_index, try_times):
128
134
for i in range (int (config .timeout / 3 )):
129
135
try :
130
136
browser .find_element (By .CLASS_NAME , 'f-window' ) \
131
- .find_elements (By .XPATH ,
132
- "//*[contains(text(), 'Submit successfully')]" )
137
+ .find_elements (By .XPATH ,
138
+ "//*[contains(text(), 'Submit successfully')]" )
133
139
except exceptions .NoSuchElementException :
134
140
time .sleep (3 )
135
141
print ('[Info] Waiting: ' + str ((i + 1 ) * 3 ) +
@@ -139,8 +145,8 @@ def report(user_index, try_times):
139
145
140
146
try :
141
147
browser .find_element (By .CLASS_NAME , 'f-window' ) \
142
- .find_elements (By .XPATH ,
143
- "//*[contains(text(), 'Submit successfully')]" )
148
+ .find_elements (By .XPATH ,
149
+ "//*[contains(text(), 'Submit successfully')]" )
144
150
except exceptions .NoSuchElementException :
145
151
print ('[Error] Submit timeout' )
146
152
if config .users [user_index ]['use_wechat' ]:
0 commit comments