fixed a logic error where verify would falsey switch ssl verifcation if provided a development proxy(default should've been true i'm a idiot and used the wrong variable name in middle of the night)

This commit is contained in:
tpv committed 2026-06-26 11:51:25 -07:00
1 parent c61ec6dd8f
commit 4397403fe8
1 file changed
+10 -4
+10 -4
View File
@@ -101,10 +101,10 @@ async def send_request(
reraise_json_error: bool = False,
development_proxy: str | None = None,
) -> dict | str:
skip_verify = False
verify = True
if development_proxy:
proxy = development_proxy
skip_verify = True
verify = False
else:
proxy = random.choice(get_proxies())
@@ -116,11 +116,17 @@ async def send_request(
json=json_data,
data=data,
proxy=proxy,
ssl=skip_verify,
ssl=verify,
) as response:
response.raise_for_status()
text = await response.text()
else:
if (
url
== "https://www.hp.com/wcs/resources/store/10151/component/configure/addtocartconfig"
):
pass
response = await session.request(
method=method.upper(),
url=url,
@@ -128,7 +134,7 @@ async def send_request(
json=json_data,
data=data,
proxy=proxy,
verify=skip_verify,
verify=verify,
)
response.raise_for_status()
text = response.text