Skip to content
Snippets Groups Projects
Commit b9f5acb5 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

adjust

parent 7d01e804
No related branches found
No related tags found
No related merge requests found
*.log
__pycache__
#!/usr/bin/fish
## This daemon will be autostart-ed on gnome startup.
## It help you submit ncov in completely automatic way.
while true
set fname /tmp/hust-ncov-mark-(env TZ=Asia/Shanghai date +%j)
set fname $HOME/tmp/hust-ncov-mark-(env TZ=Asia/Shanghai date +%j)
set fails 0
if not test -f $fname
echo 'CALL HUST-NCOV'
......@@ -15,7 +13,7 @@ while true
end; or begin
set fails (math 1+$fails)
echo "fails=$fails"
test $fails -ge 14
test $fails -ge 10
and /usr/mybin/recolic_email_notify root@recolic.net "RECOLIC NCOV NOTIFY" "hust-ncov daily auto submit has been failing for $fails times. Please fix the script!"
end
end
......
......@@ -54,10 +54,11 @@ wait_for_element_class('dialog_button')
driver.find_element_by_class_name('dialog_button').click() # first one is 'Ok', second one is 'Cancel'.
wait_for_element_class('dialog_content')
while 'If you have anything to comment' in driver.find_element_by_class_name('dialog_content').text:
wait_for_element_class('dialog_content')
while '' == driver.find_element_by_class_name('dialog_content').text:
wait_for_element_class('dialog_content')
#while 'If you have anything to comment' in driver.find_element_by_class_name('dialog_content').text:
# wait_for_element_class('dialog_content')
#while '' == driver.find_element_by_class_name('dialog_content').text:
# wait_for_element_class('dialog_content')
time.sleep(5) # magic bug, I give it up, and simply sleeps 2 second. Fix the4 code lines above if you could.
result = driver.find_element_by_class_name('dialog_content').text
print(result)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment