blob: 762d738404215c47672ccb0a8411ee3c41629cd5 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import requests
def fetch_data():
for i in range(1, 6):
print(f"Attempt {i}...")
try:
return requests.get("https://example.com/data")
except requests.exceptions.RequestException:
pass
|