fix: handle httpx exception

This commit is contained in:
xtaodada 2024-02-17 17:00:27 +08:00
parent ac2e61a58d
commit 0eb77a68ab
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -4,6 +4,7 @@ from datetime import datetime
from typing import List, Optional
from bs4 import BeautifulSoup
from httpx import RequestError
from init import request
from defs.glover import rss_hub_host, nitter_host
@ -30,6 +31,8 @@ def retry(func):
if i == 2:
raise HostNeedChange
continue
except RequestError:
continue
return wrapper