mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
fix: route GitHub stars fetch through HTTPS_PROXY
An explicit httpx.HTTPTransport makes httpx ignore HTTPS_PROXY, so the fetch failed with a DNS error wherever outbound traffic must go through a proxy. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -144,7 +144,7 @@ def main() -> None:
|
||||
|
||||
with httpx.Client(
|
||||
headers={"Authorization": f"bearer {token}", "Content-Type": "application/json"},
|
||||
transport=httpx.HTTPTransport(retries=2),
|
||||
transport=httpx.HTTPTransport(retries=2, proxy=os.environ.get("HTTPS_PROXY") or None),
|
||||
timeout=30,
|
||||
) as client:
|
||||
for batch_num, batch in enumerate(batched(to_fetch, BATCH_SIZE), 1):
|
||||
|
||||
Reference in New Issue
Block a user