free-proxy icon indicating copy to clipboard operation
free-proxy copied to clipboard

Proxy country not corrected

Open ErTenebra opened this issue 2 years ago • 1 comments

Looks like it doesnt filter correctly by nation anymore. Before this worked:

FreeProxy(country_id=['US'], https=True, rand=True).get()

Now the resulting proxy is not anymore from US but from other countries. In this moment I verified that other proxies from US are effectively working but they are not picked by Freeproxy. Thx for the attention

Edit: weid, after some hours it acts correctly, writing "There are no working proxies at this time."

ErTenebra avatar Sep 23 '22 11:09 ErTenebra

Hi. Thank you for your feedback. I checked it and it seems to work correctly. Does anyone have the same problem?

jundymek avatar Sep 24 '22 15:09 jundymek

+1 Same issue here. The website seems to have the nice correlation between IP and country code. I tried to filter by few Asian country IPs, but getting USA IP. 🤔

Thank you

3clypse avatar Oct 25 '22 09:10 3clypse

Same issue. I tried 10 times on country_id=US, or FR or ES. Got all the time India IPs and one from Germany. Thanks.

yoarch avatar Nov 10 '22 14:11 yoarch

I confirm that it doesn't work correctly :|

ErTenebra avatar Nov 10 '22 18:11 ErTenebra

Thank you guys for the feedback. I checked this and it seems to work properly. The problem is that when you select a country code and the program loops through a list of proxies that match the selected code, when there is no working proxy at this moment program begins another loop through the whole list. The selected country is checked first and when there is no working proxy it tries to find a working proxy from all proxies. It is pointed out in the documentation.

I was thinking about this problem and I have an idea. Maybe I will add another parameter (loop_times or something like that) and when the user chooses a specified country program will loop N times through the list of proxies from the selected country before going to the whole list.

What do you think?

jundymek avatar Nov 11 '22 18:11 jundymek

Hello @jundymek, Thanks for the reply. I am not sure about the loop as this will increase the time to get the proxy and if it was not available at the first attempt, what is the likelihood to have one available one second later ? There is just a risk to wait seconds to get a proxy, being a real cons.

An interesting solution might be to get the closest proxy regarding the specified country. If I want a French proxy, it would be more than acceptable to have right now a German proxy rather than a random one, for example India. But I guess this will imply a significant effort of extra development.

Best regards.

yoarch avatar Nov 11 '22 18:11 yoarch

I will add another possibility to customize requests. I just realized that there are dedicated websites for UK and US proxies. 😍 I am going to add the possibility to search https://free-proxy-list.net/uk-proxy.html for requests specified in that way:

proxy = FreeProxy(country_id=['GB']).get()

jundymek avatar Nov 11 '22 18:11 jundymek

For my purposes your last idea would be great jundymek! Thanks for your time!

ErTenebra avatar Nov 12 '22 10:11 ErTenebra

@ErTenebra @3clypse @yoarch new version 1.1.0 is ready to install. Hope it will be ok. I will keep this ticket open for a while. Write me if it meets your expectations.

jundymek avatar Nov 12 '22 20:11 jundymek

Looking at it as soon as possible. Thanks for the effort.

yoarch avatar Nov 13 '22 11:11 yoarch