We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b432ba commit b105a4fCopy full SHA for b105a4f
pipelines/datasets/br_cnj_improbidade_administrativa/utils.py
@@ -1,6 +1,7 @@
1
# -*- coding: utf-8 -*-
2
import re
3
import typing
4
+import time
5
6
import httpx
7
from lxml import html
@@ -30,7 +31,11 @@ async def get_async(client: httpx.AsyncClient, url: str) -> httpx.Response:
30
31
headers = {
32
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
33
}
- return await client.get(url, headers=headers)
34
+ try:
35
+ return await client.get(url, headers=headers)
36
+ except httpx.ConnectError:
37
+ time.sleep(10.0)
38
39
40
41
class PeopleLine(typing.TypedDict):
0 commit comments