Open ZouTaooo opened 2 years ago
develop分支解决了这个issue,数据从服务器获取,只需修改下日期。如果系统又更改了数据格式,那么需要手动打卡一次。并且现在只需提供账号密码,不用编辑那一大段信息。
develop分支解决了这个issue,数据从服务器获取,只需修改下日期。如果系统又更改了数据格式,那么需要手动打卡一次。并且现在只需提供账号密码,不用编辑那一大段信息。
zt@ndsl81:~/uestc_health_report$ python3 cv_main.py ./geckodriver
/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
cv_main.py:69: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
self.driver = webdriver.Firefox(executable_path=webdriver_path, options=options)
Traceback (most recent call last):
File "cv_main.py", line 364, in
新的develop分支运行会出错 对驱动有要求吗?
这个问题有点像是你模块没有安装完整,因为requirements.txt里面有个pywin32==300,这个地方在非windows系统下会安装报错,导致后面的module安装不上
这个问题有点像是你模块没有安装完整,因为requirements.txt里面有个pywin32==300,这个地方在非windows系统下会安装报错,导致后面的module安装不上
但是上个版本的代码 我在ubuntu 服务器版本上是可以跑的
应该是我把无窗口登录给注释掉了的原因,我改了,你更新下代码试试呢
应该是我把无窗口登录给注释掉了的原因,我改了,你更新下代码试试呢
好起来了,但是有了个新bug好像
应该是我把无窗口登录给注释掉了的原因,我改了,你更新下代码试试呢
好起来了,但是有了个新bug好像 异步刷新问题,更新下代码
应该是我把无窗口登录给注释掉了的原因,我改了,你更新下代码试试呢
好起来了,但是有了个新bug好像 异步刷新问题,更新下代码
err_msg = self.driver.find_element_by_id('msg').text Traceback (most recent call last): File "cv_main.py", line 115, in _check WebDriverWait(self.driver, 5).until(EC.presence_of_element_located( File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 89, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:393:5 element.find/</<@chrome://remote/content/marionette/element.js:299:16
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "cv_main.py", line 362, in
应该是我把无窗口登录给注释掉了的原因,我改了,你更新下代码试试呢
好起来了,但是有了个新bug好像 异步刷新问题,更新下代码
err_msg = self.driver.find_element_by_id('msg').text Traceback (most recent call last): File "cv_main.py", line 115, in _check WebDriverWait(self.driver, 5).until(EC.presence_of_element_located( File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 89, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:393:5 element.find/</<@chrome://remote/content/marionette/element.js:299:16
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "cv_main.py", line 362, in check_job() File "cv_main.py", line 346, in check_job reporter.login() File "cv_main.py", line 129, in login if _check(): File "cv_main.py", line 119, in _check err_msg = self.driver.find_element_by_id('msg').text File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 472, in find_element_by_id return self.findelement(by=By.ID, value=id) File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1244, in find_element return self.execute(Command.FIND_ELEMENT, { File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute self.error_handler.check_response(response) File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="msg"] Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:393:5 element.find/</<@chrome://remote/content/marionette/element.js:299:16
已解决,请更新代码
应该是我把无窗口登录给注释掉了的原因,我改了,你更新下代码试试呢
好起来了,但是有了个新bug好像 异步刷新问题,更新下代码
err_msg = self.driver.find_element_by_id('msg').text Traceback (most recent call last): File "cv_main.py", line 115, in _check WebDriverWait(self.driver, 5).until(EC.presence_of_element_located( File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 89, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:393:5 element.find/</<@chrome://remote/content/marionette/element.js:299:16 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "cv_main.py", line 362, in check_job() File "cv_main.py", line 346, in check_job reporter.login() File "cv_main.py", line 129, in login if _check(): File "cv_main.py", line 119, in _check err_msg = self.driver.find_element_by_id('msg').text File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 472, in find_element_by_id return self.findelement(by=By.ID, value=id) File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1244, in find_element return self.execute(Command.FIND_ELEMENT, { File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute self.error_handler.check_response(response) File "/home/zt/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="msg"] Stacktrace: WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5 NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:393:5 element.find/</<@chrome://remote/content/marionette/element.js:299:16
已解决,请更新代码
OK了 家人们 没毛病
只知道绿码和已接种的填写方式,在daily_report_data中的数据加入以下数据。
其他非绿码或者未接种的数据需要自己抓包看一下才知道了