mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +00:00
Fix Kheina returning content-type errors
This commit is contained in:
parent
78c78c61d1
commit
82e010c795
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,10 @@ async def query_kheina(url):
|
||||||
content = re.sub('<a href="/cdn-cgi/l/email-protection".+</a>', '', content)
|
content = re.sub('<a href="/cdn-cgi/l/email-protection".+</a>', '', content)
|
||||||
|
|
||||||
soup = BeautifulSoup(content, 'html5lib')
|
soup = BeautifulSoup(content, 'html5lib')
|
||||||
|
|
||||||
|
if soup.find('data', id='error'):
|
||||||
|
return False
|
||||||
|
|
||||||
results = soup.find('data', id='results').string
|
results = soup.find('data', id='results').string
|
||||||
results = ast.literal_eval(results)
|
results = ast.literal_eval(results)
|
||||||
iqdbdata = soup.find('data', id='iqdbdata').string
|
iqdbdata = soup.find('data', id='iqdbdata').string
|
||||||
|
|
Loading…
Reference in a new issue