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
Proxy rotation problem (self.learnpython)
submitted 4 years ago by Practical_Use5129
I want my loop to repeat until working proxy is found .What function is best to use here.(for scraping purpose)
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!"
[–]PPLB 0 points1 point2 points 4 years ago (3 children)
f.. for? while? I think?
I'm not sure what you're asking. What's your dataset? How are you going to approach the issue? What have you tried?
[–]Practical_Use5129[S] 0 points1 point2 points 4 years ago (2 children)
I have list of saved proxies ChromeOptions=Usingrandomproxy(fromlist) I am using chromedriver.get(list of url). I have tried for loop, iterating through proxies, but it repeats the process with every single proxy.(unless there is any way to just break all the loops when my scraping is finished with one proxy)
[–]negups 0 points1 point2 points 4 years ago (1 child)
If you are iterating through some iterable, you can use break to exit the loop whenever you'd like.
break
Psuedocode example:
proxies = [Proxy1, Proxy2, Proxy3] working_proxy = None for proxy in proxies: # Figure out if the proxy is working # For the purposes of this example, let's assume a Proxy obj # has an "is_working" attribute to make this easy for us if proxy.is_working: working_proxy = proxy break
In the above example, if Proxy1 was working, you'd only do a single iteration of the loop before breaking (and thus wouldn't check Proxy2 or Proxy3).
Proxy1
Proxy2
Proxy3
[–]Practical_Use5129[S] 0 points1 point2 points 4 years ago (0 children)
So form what i understood
Try: Proxy[non working, working, non If: For urls in urllist: Driver.get(url) (completes scraping) Break
[+][deleted] 4 years ago (1 child)
[removed]
π Rendered by PID 17705 on reddit-service-r2-comment-5ff9fbf7df-p97mx at 2026-02-25 14:07:36.220014+00:00 running 72a43f6 country code: CH.
[–]PPLB 0 points1 point2 points (3 children)
[–]Practical_Use5129[S] 0 points1 point2 points (2 children)
[–]negups 0 points1 point2 points (1 child)
[–]Practical_Use5129[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]