mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 06:27:27 +00:00
Change HTML sanitization to be more simplistic
This commit is contained in:
parent
f128f4b675
commit
496d5bc00c
1 changed files with 3 additions and 2 deletions
|
@ -43,9 +43,10 @@ from utils import utils as u
|
|||
async def query_kheina(url):
|
||||
content = await u.fetch('https://kheina.com', params={'url': url}, text=True)
|
||||
|
||||
content = content.replace('"', 'quot;').replace(''', 'apos;')
|
||||
for e in ('"', '''):
|
||||
content = content.replace(e, '')
|
||||
soup = BeautifulSoup(content, 'html5lib')
|
||||
results = soup.find('data', id='results').string.replace('quot;', '"').replace('apos;', ''')
|
||||
results = soup.find('data', id='results').string
|
||||
results = ast.literal_eval(results)
|
||||
iqdbdata = soup.find('data', id='iqdbdata').string
|
||||
iqdbdata = ast.literal_eval(iqdbdata)
|
||||
|
|
Loading…
Reference in a new issue