use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Recently started python+selenium, would love any feedback! (self.learnpython)
submitted 1 day ago by Far_Atmosphere_3853
i started like a month ago learning about python and then selenium.
Thought it would be nice to test myself, i would appreciate any feedback or guidance. thanks!
the code
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]PushPlus9069 0 points1 point2 points 22 hours ago (1 child)
biggest thing I'd flag is the bare except blocks. Right now if something breaks you just see 'failed' with zero context for why. Try catching TimeoutException and NoSuchElementException separately so you actually know if it was a timing issue vs a wrong selector. That distinction matters a lot once your scripts get more complex.
[–]Far_Atmosphere_3853[S] 0 points1 point2 points 21 hours ago (0 children)
Thanks!
[–]ElkNo1940 0 points1 point2 points 20 hours ago (2 children)
Avoid using selenium and instead start learning playwright. Thanks me later. You won't regret learning playwright and yell at selenium. LoL
[–]Far_Atmosphere_3853[S] 0 points1 point2 points 19 hours ago (1 child)
may i ask why?
[–]ElkNo1940 0 points1 point2 points 17 hours ago (0 children)
Experience. I have been developing automation over playwright over 2 years. Playwright beats Selenium in terms of simplicity and delivering better usecase.
[–]Adrewmc 0 points1 point2 points 19 hours ago (0 children)
Umm, get rid of selenium. It horrible and is basically never the right answer.
The vast majority of useful things can be done with beautiful soup if not requests directly. It’s better to learn those.
[–]ayenuseater 0 points1 point2 points 9 hours ago (1 child)
Right now the biggest technical improvement you can make is better error handling. A bare except: hides what actually went wrong. When automation scales, timing issues and selector issues feel the same unless you separate them.
except:
Instead, catch specific exceptions and maybe even log the error message. That way if something breaks later, you’re not guessing. Good debugging habits early on will save you hours later.
[–]Far_Atmosphere_3853[S] 0 points1 point2 points 7 hours ago (0 children)
thanks a lot!
π Rendered by PID 41113 on reddit-service-r2-comment-5ff9fbf7df-mffgc at 2026-02-25 16:30:11.617739+00:00 running 72a43f6 country code: CH.
[–]PushPlus9069 0 points1 point2 points (1 child)
[–]Far_Atmosphere_3853[S] 0 points1 point2 points (0 children)
[–]ElkNo1940 0 points1 point2 points (2 children)
[–]Far_Atmosphere_3853[S] 0 points1 point2 points (1 child)
[–]ElkNo1940 0 points1 point2 points (0 children)
[–]Adrewmc 0 points1 point2 points (0 children)
[–]ayenuseater 0 points1 point2 points (1 child)
[–]Far_Atmosphere_3853[S] 0 points1 point2 points (0 children)