mirror of
https://github.com/Xtao-Labs/twitter2telegram.git
synced 2024-11-21 22:58:08 +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 typing import List, Optional
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
from httpx import RequestError
|
||||||
|
|
||||||
from init import request
|
from init import request
|
||||||
from defs.glover import rss_hub_host, nitter_host
|
from defs.glover import rss_hub_host, nitter_host
|
||||||
@ -30,6 +31,8 @@ def retry(func):
|
|||||||
if i == 2:
|
if i == 2:
|
||||||
raise HostNeedChange
|
raise HostNeedChange
|
||||||
continue
|
continue
|
||||||
|
except RequestError:
|
||||||
|
continue
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user