Files
dagster/snippets/proxy.py
2025-08-22 09:43:22 +02:00

11 lines
224 B
Python

import requests
def get(url, proxy=True):
if proxy:
tmp = "socks5://localhost:1080"
kwargs = dict(proxies=dict(http=tmp, https=tmp))
else:
kwargs = {}
return requests.get(url, **kwargs)