fix: remove duplicated URL schema in proxy check (#52, #43)#57
Open
jundymek wants to merge 1 commit into
Open
Conversation
katarzynaheller
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: remove duplicated URL schema in proxy check (#52, #43)
Problem
Since v1.1.3,
FreeProxy(https=True).get()and any customurl=always failed withFreeProxyException: There are no working proxies at this time.— reported in #52 and #43.Root cause
In
__check_if_proxy_is_working, the test URL was built as:But
self.urlalready includes a schema (default'https://www.google.com'). This produced a malformed double-schema URL:FreeProxy()http://https://www.google.com❌FreeProxy(https=True)https://https://www.google.com❌FreeProxy(url='http://httpbin.org/get')http://http://httpbin.org/get❌Every proxy check raised on the malformed URL, so
get()treated all proxies as dead and ultimately raisedFreeProxyException. Regression introduced in 1.1.3 (#49) when theurlparameter was added.Fix
Use
self.urldirectly, since it already carries its schema:Tests
Added two regression tests (TDD — written first, confirmed failing before the fix):
test_check_uses_default_url_without_double_schematest_check_uses_custom_url_without_double_schemaFreeProxy(https=True).get()(was always failing per #52)Version
Patch bump
1.2.0→1.2.1(bugfix, no API change). CHANGELOG and README badge updated.Closes #52
Closes #43