rhinoblindado / pradoscraper Goto Github PK
View Code? Open in Web Editor NEWPrograma que te avisa si se ha actualizado alguna asignatura en PRADO.
Programa que te avisa si se ha actualizado alguna asignatura en PRADO.
Por ejemplo, si lo lanzo desde mi home, me da el siguiente error
COURSES folder not found, making one.
Traceback (most recent call last):
File "Uni/pradoscraper/webPrado.py", line 221, in
main()
File "Uni/pradoscraper/webPrado.py", line 197, in main
logInfo, courses = checkStatus()
File "Uni/pradoscraper/webPrado.py", line 48, in checkStatus
raise Exception("A courseList.txt file is needed.")
Y si se vuelve a lanzar como siempre, ya no funciona. Da el siguiente error:
Traceback (most recent call last):
File "webPrado.py", line 221, in
main()
File "webPrado.py", line 206, in main
courseRead(courses, driver)
File "webPrado.py", line 109, in courseRead
actualCourse = driver.find_element_by_xpath("//h4[contains(text(),'"+i+"')]")
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //h4[contains(text(),'FUNDAMENTOS DE BASES DE DATOS - 2021 (COMÚN)')]
El programa me dio el siguiente error
4 / 4
Traceback (most recent call last):
File "webPrado.py", line 221, in
main()
File "webPrado.py", line 206, in main
courseRead(courses, driver)
File "webPrado.py", line 110, in courseRead
actualCourse.click()
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/cristina/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: Element
El problema es que me había dejado la última línea en blanco en CourseList.txt. El problema se solucionó cuando borré el último salto de línea.
El programa podría comprobar de alguna forma si son líneas vacías para evitar que a otra persona le de este error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.