mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +00:00
Change reverse image footer to display source hostname
This commit is contained in:
parent
68fc9bb541
commit
ffee58656c
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import ast
|
import ast
|
||||||
import re
|
import re
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import lxml
|
import lxml
|
||||||
|
@ -72,7 +73,7 @@ async def query_kheina(url):
|
||||||
'artist': match[4],
|
'artist': match[4],
|
||||||
'thumbnail': f'https://f002.backblazeb2.com/file/kheinacom/{match[1]}.jpg',
|
'thumbnail': f'https://f002.backblazeb2.com/file/kheinacom/{match[1]}.jpg',
|
||||||
'similarity': str(similarity),
|
'similarity': str(similarity),
|
||||||
'database': 'Kheina'
|
'database': urlparse(match[3].replace('\\', '')).hostname.split('.')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
@ -124,7 +125,7 @@ async def query_saucenao(url):
|
||||||
'artist': artist,
|
'artist': artist,
|
||||||
'thumbnail': match['header']['thumbnail'],
|
'thumbnail': match['header']['thumbnail'],
|
||||||
'similarity': str(similarity),
|
'similarity': str(similarity),
|
||||||
'database': 'SauceNAO'
|
'database': urlparse(source).hostname.split('.')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue