Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit 2a7af37

Browse files
Raise error is the response status is not ok
1 parent 00c73de commit 2a7af37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pubproxpy/fetcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ def get(self, amount=1):
202202
if self._exclude_used:
203203
self._shared.used |= set(temp)
204204

205-
print(f"{temp} {self._proxies}")
206-
207205
return temp
208206

209207
def get_proxy(self):
@@ -241,6 +239,8 @@ def _fetch(self):
241239

242240
# Query the api
243241
resp = requests.get(self._query)
242+
# And ensure the response is ok
243+
resp.raise_for_status()
244244

245245
try:
246246
data = json.loads(resp.text)["data"]

0 commit comments

Comments
 (0)