Skip to content

Commit e86d44a

Browse files
Hessu1337pgaref
authored andcommitted
fix samair parser (#34)
Addressing #33 - Tests are still failing
1 parent f56ba23 commit e86d44a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

http_request_randomizer/requests/parsers/SamairProxyParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def parse_proxyList(self):
3737
# value = p[1].split('\"')[1]
3838
# ports[key] = value
3939

40-
table = soup.find("table", attrs={"id": "proxylist"})
40+
table = soup.find("div", attrs={"id": "proxylist"})
4141
# The first tr contains the field names.
4242
headings = [th.get_text() for th in table.find("tr").find_all("th")]
4343
for row in table.find_all("tr")[1:]:

http_request_randomizer/requests/proxy/requestProxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def generate_proxied_request(self, url, method="GET", params={}, data={}, header
9999

100100
self.logger.debug("Using proxy: {0}".format(str(self.current_proxy)))
101101
request = requests.request(method, url, proxies={"http": self.current_proxy},
102-
headers=headers, data=data, params=params, timeout=req_timeout)
102+
headers=headers, data=data, params=params, timeout=req_timeout, allow_redirects=False)
103103
# Avoid HTTP request errors
104104
if request.status_code == 409:
105105
raise ConnectionError("HTTP Response [409] - Possible Cloudflare DNS resolution error")

0 commit comments

Comments
 (0)