mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 13:02:38 +00:00
Change semantics to clarify action
This commit is contained in:
parent
5987b46925
commit
e51c5615d8
1 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@ from utils import utils as u
|
|||
# return False
|
||||
|
||||
|
||||
async def get_kheina(url):
|
||||
async def query_kheina(url):
|
||||
content = await u.fetch('https://kheina.com', params={'url': url}, text=True)
|
||||
|
||||
content = content.replace('"', 'quot;').replace(''', 'apos;')
|
||||
|
@ -66,7 +66,7 @@ async def get_kheina(url):
|
|||
return result
|
||||
|
||||
|
||||
async def get_saucenao(url):
|
||||
async def query_saucenao(url):
|
||||
content = await u.fetch(
|
||||
'https://saucenao.com/search.php',
|
||||
params={'url': url, 'api_key': u.config['saucenao_api'], 'output_type': 2},
|
||||
|
@ -102,9 +102,9 @@ async def get_post(url):
|
|||
if filesize > 8192 * 1024:
|
||||
raise exc.SizeError(size(filesize, system=alternative))
|
||||
|
||||
result = await get_kheina(url)
|
||||
result = await query_kheina(url)
|
||||
if int(result['similarity']) < 55:
|
||||
result = await get_saucenao(url)
|
||||
result = await query_saucenao(url)
|
||||
if int(result['similarity']) < 55:
|
||||
raise exc.MatchError(re.search('\\/([^\\/]+)$', url).group(1))
|
||||
|
||||
|
|
Loading…
Reference in a new issue