79127621

Date: 2024-10-26 00:50:50
Score: 1.5
Natty:
Report link

I have a solution inspired in this comment: ...requests/issues/1803#...30869031

from concurrent.futures import ThreadPoolExecutor


with ThreadPoolExecutor(max_workers=1) as executor:
    future = executor.submit(requests.get, url, stream=True)
    response = future.result(timeout=3)  # 3 secs of timeout
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: eEmanuel Oviedo