mirror of
https://github.com/myned/modufur.git
synced 2024-12-23 22:27:27 +00:00
Formatting tweaks
This commit is contained in:
parent
33891cb409
commit
84f45d4f7d
1 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
import aiohttp as aio
|
||||
from bs4 import BeautifulSoup
|
||||
from lxml import html
|
||||
|
||||
|
@ -8,10 +7,13 @@ from utils import utils as u
|
|||
|
||||
async def check_match(url):
|
||||
r = await u.fetch('http://iqdb.harry.lu/?url={}'.format(url))
|
||||
soup = BeautifulSoup(await r.read(), 'html.parser')
|
||||
value = soup.find_all('a')[1].get('href')
|
||||
|
||||
try:
|
||||
value = BeautifulSoup(await r.read(), 'html.parser').find_all('a')[1].get('href')
|
||||
except IndexError:
|
||||
raise exc.MatchError
|
||||
|
||||
if value != '#':
|
||||
return value
|
||||
else:
|
||||
raise exc.MatchError(value)
|
||||
raise exc.MatchError
|
||||
|
|
Loading…
Reference in a new issue