free-proxy 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: free_proxy
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Proxy scraper for further use
5
5
  Home-page: https://github.com/jundymek/free-proxy
6
6
  Author: jundymek
@@ -26,7 +26,7 @@ Dynamic: summary
26
26
 
27
27
  # Free-proxy
28
28
 
29
- ![Version 1.2.0](https://img.shields.io/badge/Version-1.2.0-blue.svg)
29
+ ![Version 1.2.2](https://img.shields.io/badge/Version-1.2.2-blue.svg)
30
30
 
31
31
  ## Get free working proxies from <https://www.sslproxies.org/>, <https://www.us-proxy.org/>, <https://free-proxy-list.net/uk-proxy.html> and <https://free-proxy-list.net> and use them in your script
32
32
 
@@ -75,6 +75,7 @@ from fp.fp import FreeProxy
75
75
  | google | bool,None | False | None |
76
76
  | https | bool | True | False |
77
77
  | url | str | '' | google.com |
78
+ | request_timeout | float > 0 | 5 | 10 |
78
79
  - **No parameters**
79
80
  Get the first working proxy from <https://www.sslproxies.org/>. If no proxies are working, try again pulling from <https://free-proxy-list.net>
80
81
 
@@ -167,9 +168,35 @@ Using custom URL, if test on different endpoint is needed:
167
168
  proxy = FreeProxy(url='http://httpbin.org/get').get()
168
169
  ```
169
170
 
171
+ - **`request_timeout` parameter**
172
+ Number of seconds to wait when downloading the proxy list from the source websites (<https://www.sslproxies.org/> etc.).
173
+ If the website does not respond in that time, the script raises `FreeProxyException` instead of hanging indefinitely.
174
+ Defaults to `request_timeout=10`. Not to be confused with `timeout`, which is used for checking individual proxies.
175
+
176
+ ```python
177
+ proxy = FreeProxy(request_timeout=5).get()
178
+ ```
179
+
170
180
  ## CHANGELOG
171
181
 
172
182
  ---
183
+ ## [1.2.2] - 2026-07-04
184
+
185
+ - Fixed `get_proxy_list` hanging indefinitely when a source website stalls — the proxy list request now has a timeout (#58)
186
+ - Added `request_timeout` parameter (default: 10 seconds) to control the proxy list download timeout
187
+
188
+ ## [1.2.1] - 2026-06-09
189
+
190
+ - Fixed proxy check failing due to a duplicated URL schema (`http://https://...`), introduced in 1.1.3. This broke `https=True` and custom `url` usage (#52, #43).
191
+
192
+ ## [1.2.0] - 2026-06-09
193
+
194
+ - Updated lxml to version 6.1.1
195
+ - Updated requests to version 2.34.2
196
+ - Updated pip-chill to version 1.0.5
197
+ - Pinned minimum dependency versions in `install_requires` (`lxml>=5.0,<7`, `requests>=2.31,<3`)
198
+ - Raised minimum Python version to 3.8
199
+
173
200
  ## [1.1.3] - 2024-11-07
174
201
 
175
202
  - Added `url` paramameter
@@ -1,6 +1,6 @@
1
1
  # Free-proxy
2
2
 
3
- ![Version 1.2.0](https://img.shields.io/badge/Version-1.2.0-blue.svg)
3
+ ![Version 1.2.2](https://img.shields.io/badge/Version-1.2.2-blue.svg)
4
4
 
5
5
  ## Get free working proxies from <https://www.sslproxies.org/>, <https://www.us-proxy.org/>, <https://free-proxy-list.net/uk-proxy.html> and <https://free-proxy-list.net> and use them in your script
6
6
 
@@ -49,6 +49,7 @@ from fp.fp import FreeProxy
49
49
  | google | bool,None | False | None |
50
50
  | https | bool | True | False |
51
51
  | url | str | '' | google.com |
52
+ | request_timeout | float > 0 | 5 | 10 |
52
53
  - **No parameters**
53
54
  Get the first working proxy from <https://www.sslproxies.org/>. If no proxies are working, try again pulling from <https://free-proxy-list.net>
54
55
 
@@ -141,9 +142,35 @@ Using custom URL, if test on different endpoint is needed:
141
142
  proxy = FreeProxy(url='http://httpbin.org/get').get()
142
143
  ```
143
144
 
145
+ - **`request_timeout` parameter**
146
+ Number of seconds to wait when downloading the proxy list from the source websites (<https://www.sslproxies.org/> etc.).
147
+ If the website does not respond in that time, the script raises `FreeProxyException` instead of hanging indefinitely.
148
+ Defaults to `request_timeout=10`. Not to be confused with `timeout`, which is used for checking individual proxies.
149
+
150
+ ```python
151
+ proxy = FreeProxy(request_timeout=5).get()
152
+ ```
153
+
144
154
  ## CHANGELOG
145
155
 
146
156
  ---
157
+ ## [1.2.2] - 2026-07-04
158
+
159
+ - Fixed `get_proxy_list` hanging indefinitely when a source website stalls — the proxy list request now has a timeout (#58)
160
+ - Added `request_timeout` parameter (default: 10 seconds) to control the proxy list download timeout
161
+
162
+ ## [1.2.1] - 2026-06-09
163
+
164
+ - Fixed proxy check failing due to a duplicated URL schema (`http://https://...`), introduced in 1.1.3. This broke `https=True` and custom `url` usage (#52, #43).
165
+
166
+ ## [1.2.0] - 2026-06-09
167
+
168
+ - Updated lxml to version 6.1.1
169
+ - Updated requests to version 2.34.2
170
+ - Updated pip-chill to version 1.0.5
171
+ - Pinned minimum dependency versions in `install_requires` (`lxml>=5.0,<7`, `requests>=2.31,<3`)
172
+ - Raised minimum Python version to 3.8
173
+
147
174
  ## [1.1.3] - 2024-11-07
148
175
 
149
176
  - Added `url` paramameter
@@ -18,9 +18,10 @@ class FreeProxy:
18
18
  working proxy.
19
19
  '''
20
20
 
21
- def __init__(self, country_id=None, timeout=0.5, rand=False, anonym=False, elite=False, google=None, https=False, url='https://www.google.com'):
21
+ def __init__(self, country_id=None, timeout=0.5, rand=False, anonym=False, elite=False, google=None, https=False, url='https://www.google.com', request_timeout=10):
22
22
  self.country_id = country_id
23
23
  self.timeout = timeout
24
+ self.request_timeout = request_timeout
24
25
  self.random = rand
25
26
  self.anonym = anonym
26
27
  self.elite = elite
@@ -30,7 +31,7 @@ class FreeProxy:
30
31
 
31
32
  def get_proxy_list(self, repeat):
32
33
  try:
33
- page = requests.get(self.__website(repeat))
34
+ page = requests.get(self.__website(repeat), timeout=self.request_timeout)
34
35
  doc = lh.fromstring(page.content)
35
36
  except requests.exceptions.RequestException as e:
36
37
  raise FreeProxyException(
@@ -88,7 +89,7 @@ class FreeProxy:
88
89
  'There are no working proxies at this time.')
89
90
 
90
91
  def __check_if_proxy_is_working(self, proxies):
91
- url = f'{self.schema}://{self.url}'
92
+ url = self.url
92
93
  ip = proxies[self.schema].split(':')[1][2:]
93
94
  with requests.get(url, proxies=proxies, timeout=self.timeout, stream=True) as r:
94
95
  if r.raw.connection.sock and r.raw.connection.sock.getpeername()[0] == ip:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: free_proxy
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Proxy scraper for further use
5
5
  Home-page: https://github.com/jundymek/free-proxy
6
6
  Author: jundymek
@@ -26,7 +26,7 @@ Dynamic: summary
26
26
 
27
27
  # Free-proxy
28
28
 
29
- ![Version 1.2.0](https://img.shields.io/badge/Version-1.2.0-blue.svg)
29
+ ![Version 1.2.2](https://img.shields.io/badge/Version-1.2.2-blue.svg)
30
30
 
31
31
  ## Get free working proxies from <https://www.sslproxies.org/>, <https://www.us-proxy.org/>, <https://free-proxy-list.net/uk-proxy.html> and <https://free-proxy-list.net> and use them in your script
32
32
 
@@ -75,6 +75,7 @@ from fp.fp import FreeProxy
75
75
  | google | bool,None | False | None |
76
76
  | https | bool | True | False |
77
77
  | url | str | '' | google.com |
78
+ | request_timeout | float > 0 | 5 | 10 |
78
79
  - **No parameters**
79
80
  Get the first working proxy from <https://www.sslproxies.org/>. If no proxies are working, try again pulling from <https://free-proxy-list.net>
80
81
 
@@ -167,9 +168,35 @@ Using custom URL, if test on different endpoint is needed:
167
168
  proxy = FreeProxy(url='http://httpbin.org/get').get()
168
169
  ```
169
170
 
171
+ - **`request_timeout` parameter**
172
+ Number of seconds to wait when downloading the proxy list from the source websites (<https://www.sslproxies.org/> etc.).
173
+ If the website does not respond in that time, the script raises `FreeProxyException` instead of hanging indefinitely.
174
+ Defaults to `request_timeout=10`. Not to be confused with `timeout`, which is used for checking individual proxies.
175
+
176
+ ```python
177
+ proxy = FreeProxy(request_timeout=5).get()
178
+ ```
179
+
170
180
  ## CHANGELOG
171
181
 
172
182
  ---
183
+ ## [1.2.2] - 2026-07-04
184
+
185
+ - Fixed `get_proxy_list` hanging indefinitely when a source website stalls — the proxy list request now has a timeout (#58)
186
+ - Added `request_timeout` parameter (default: 10 seconds) to control the proxy list download timeout
187
+
188
+ ## [1.2.1] - 2026-06-09
189
+
190
+ - Fixed proxy check failing due to a duplicated URL schema (`http://https://...`), introduced in 1.1.3. This broke `https=True` and custom `url` usage (#52, #43).
191
+
192
+ ## [1.2.0] - 2026-06-09
193
+
194
+ - Updated lxml to version 6.1.1
195
+ - Updated requests to version 2.34.2
196
+ - Updated pip-chill to version 1.0.5
197
+ - Pinned minimum dependency versions in `install_requires` (`lxml>=5.0,<7`, `requests>=2.31,<3`)
198
+ - Raised minimum Python version to 3.8
199
+
173
200
  ## [1.1.3] - 2024-11-07
174
201
 
175
202
  - Added `url` paramameter
@@ -4,7 +4,7 @@ with open("README.md", "r") as fh:
4
4
  long_description = fh.read()
5
5
  setuptools.setup(
6
6
  name='free_proxy',
7
- version='1.2.0',
7
+ version='1.2.2',
8
8
  author="jundymek",
9
9
  author_email="jundymek@gmail.com",
10
10
  description="Proxy scraper for further use",
File without changes
File without changes
File without changes
File without changes