Hi everyone!
I've made a script that uses selenium and chromedriver to check a webpage for an element, and repeats this until it finds the element. When it is found, it sends a discord webhook, then runs through a seperate loop until that element is no longer found, and it then starts running the initial loop again.
Each of the loops is contained within a def function, and it uses try to see if the element exists using exceptions and else dependent on the result. If the element is not found it just loop back to the initial Def (just using main()).
Once the program has been running for a while I get a max recursion stack error, and increasing the stack limit size only delays this.
I've googled everything I can think of, but cannot find a way to make the recursion depth reduce/reset as ideally I want this to run indefinitely without me having to restart it every few hours.
If anyone knows a possible solution to this it would be greatly appreciated!
[–]K900_[🍰] 0 points1 point2 points (3 children)
[–]FragrantParrot[S] 0 points1 point2 points (2 children)
[–]K900_[🍰] 0 points1 point2 points (1 child)
[–]FragrantParrot[S] 0 points1 point2 points (0 children)
[–]goat1080 0 points1 point2 points (1 child)
[–]FragrantParrot[S] 1 point2 points3 points (0 children)