1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 13:02:38 +00:00

Fix Kheina returning content-type errors

This commit is contained in:
Myned 2019-10-01 21:59:32 -04:00
parent 78c78c61d1
commit 82e010c795
No known key found for this signature in database
GPG key ID: BC58C09870A63E59

View file

@ -48,6 +48,10 @@ async def query_kheina(url):
content = re.sub('<a href="/cdn-cgi/l/email-protection".+</a>', '', content)
soup = BeautifulSoup(content, 'html5lib')
if soup.find('data', id='error'):
return False
results = soup.find('data', id='results').string
results = ast.literal_eval(results)
iqdbdata = soup.find('data', id='iqdbdata').string