From 91cd067352f97aa6c2f177d12a2748c7eabf05fa Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 16 May 2020 20:38:03 +0200 Subject: [PATCH] Fix crash on anime-ultime --- pynyaata/connectors/animeultime.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pynyaata/connectors/animeultime.py b/pynyaata/connectors/animeultime.py index 268b174..039074d 100644 --- a/pynyaata/connectors/animeultime.py +++ b/pynyaata/connectors/animeultime.py @@ -34,8 +34,9 @@ class AnimeUltime(ConnectorCore): if response['http_code'] == 200: html = BeautifulSoup(response['output'], 'html.parser') title = html.select('div.title') + player = html.select('div.AUVideoPlayer') - if 'Recherche' in title[0].string: + if 'Recherche' in title[0].decode_contents(): trs = html.select('table.jtable tr') for i, tr in enumerate(trs): @@ -58,8 +59,7 @@ class AnimeUltime(ConnectorCore): 'date': parse_date(None), 'class': self.color if link_exist_in_db(href) else '' }) - else: - player = html.select('div.AUVideoPlayer') + elif len(player) > 0: name = html.select('h1') ani_type = html.select('div.titre') href = '%s/file-0-1/%s' % (self.base_url, player[0]['data-serie'])