纽约DOE健康筛查的自动表格填充剂

发布于 2025-02-05 07:08:18 字数 1098 浏览 2 评论 0原文

我是编程的新手。 我需要在纽约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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文