纽约DOE健康筛查的自动表格填充剂
我是编程的新手。 我需要在纽约Doe学校做健康筛查。这是平凡而重复的任务。因此,我认为如果我为其制作了一个表单填充机器人,并且还能了解有关编程的更多信息。因此,我在Pycharm中使用Python和Selenium。我正在运行该程序,但它在健康筛查网站上没有工作。当我在Google论坛上使用类似格式时,它起作用了。那我做错了什么?还是在机器人保护网站中的构建?这是代码。
from selenium import webdriver
import time
web = webdriver.Chrome(executable_path='C:/path/chromedriver.exe')
#web.get('https://forms.gle/4WfVvWdZSi31f5DB9')
web.get('https://healthscreening.schools.nyc/?type=G#')
web.set_page_load_timeout(5)
Email = "[email protected]"
School = "//*[@id='guest_identity_form']/div[2]/div[14]/span/span/span[1]/div"
Floor = ""
LastName = "DOE"
FirstName = "JOHN"
first = web.find_element_by_id('guest_first_name')
last = web.find_element_by_id('guest_last_name')
GYbutton = web.find_element_by_id('guest_isNonDOE')
school = web.find_element_by_xpath('//*[@id="guest_identity_form"]/div[2]/div[14]/span/span/span[1]/div')
GYbutton.click()
first.send_keys(FirstName)
last.send_keys(LastName)
school.click()
谢谢
I am new to programming.
I need to do health screening for my job at NYC DOE school. It is mundane and repetitive task. So I thought it would saving me time if I made a form filler bot for it and also learn more about programming. so I am using python and selenium in pycharm. i am running the program but it's not working on the health screening website. when I used similar format on google forum it worked. so what am I doing wrong? or is it a build in bot protection website? Here is the code.
from selenium import webdriver
import time
web = webdriver.Chrome(executable_path='C:/path/chromedriver.exe')
#web.get('https://forms.gle/4WfVvWdZSi31f5DB9')
web.get('https://healthscreening.schools.nyc/?type=G#')
web.set_page_load_timeout(5)
Email = "[email protected]"
School = "//*[@id='guest_identity_form']/div[2]/div[14]/span/span/span[1]/div"
Floor = ""
LastName = "DOE"
FirstName = "JOHN"
first = web.find_element_by_id('guest_first_name')
last = web.find_element_by_id('guest_last_name')
GYbutton = web.find_element_by_id('guest_isNonDOE')
school = web.find_element_by_xpath('//*[@id="guest_identity_form"]/div[2]/div[14]/span/span/span[1]/div')
GYbutton.click()
first.send_keys(FirstName)
last.send_keys(LastName)
school.click()
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论