mirror of
https://github.com/Xtao-Labs/twitter2telegram.git
synced 2024-11-21 14:48:21 +00:00
fix: handle httpx exception
This commit is contained in:
parent
ac2e61a58d
commit
0eb77a68ab
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user