mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Fix extraneous errors messing up fallbacks
This commit is contained in:
parent
f5ef45f8ee
commit
02116ee1e1
1 changed files with 15 additions and 7 deletions
|
@ -41,6 +41,7 @@ from utils import utils as u
|
|||
|
||||
|
||||
async def query_kheina(url):
|
||||
try:
|
||||
content = await u.fetch('https://kheina.com', params={'url': url}, text=True)
|
||||
|
||||
for e in ('"', '''):
|
||||
|
@ -76,8 +77,12 @@ async def query_kheina(url):
|
|||
|
||||
return result
|
||||
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
async def query_saucenao(url):
|
||||
try:
|
||||
content = await u.fetch(
|
||||
'https://saucenao.com/search.php',
|
||||
params={'url': url, 'api_key': u.config['saucenao_api'], 'output_type': 2},
|
||||
|
@ -121,6 +126,9 @@ async def query_saucenao(url):
|
|||
|
||||
return result
|
||||
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
async def get_post(url):
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue