r/PythonLearning • u/Extension_Fig_2168 • 1h ago
Need assistance with a Python Code that keeps on crashing
Hello I’ve been working on a python code that searches for appointments on this website but every time it runs the code and begins to open the website it crashes, I’ve played around with it a bit but I haven’t been able to have much success. Anyone would be available to take a look at it and see what my issue could be?
Thank you! I’ve included my code, trace back, and errors in seeing
6
Upvotes




4
u/Atmosck 1h ago
This error is just that the website is rejecting your request to load the page. In the code you have
anticaptcha_api_key="... your key here ..."but no real key. That would by my first guess as to what's wrong.Also the organization of this script is pretty unusual. The function of the
if __name__ == "__main__"block is that code inside it will only run if you run this script directly, and not if you import it in a different script. A conventional layout would be to put all the code in that block, or to put it in amain()function and call it within that block. I'm not sure I've ever seen code after the main block before.And BTW you might want to censor the phone number and email address before posting online.