diff options
Diffstat (limited to 'searx/engines/tokyotoshokan.py')
-rw-r--r-- | searx/engines/tokyotoshokan.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/searx/engines/tokyotoshokan.py b/searx/engines/tokyotoshokan.py index b01de38c1..33f036428 100644 --- a/searx/engines/tokyotoshokan.py +++ b/searx/engines/tokyotoshokan.py @@ -1,12 +1,13 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -""" - Tokyo Toshokan (A BitTorrent Library for Japanese Media) +"""Tokyo Toshokan (A BitTorrent Library for Japanese Media) + """ import re +from datetime import datetime from urllib.parse import urlencode + from lxml import html -from datetime import datetime from searx.utils import extract_text, get_torrent_size, int_or_zero # about @@ -75,14 +76,14 @@ def response(resp): # ('1.228', 'GB') groups = size_re.match(item).groups() params['filesize'] = get_torrent_size(groups[0], groups[1]) - except: + except: # pylint: disable=bare-except pass elif item.startswith('Date:'): try: # Date: 2016-02-21 21:44 UTC date = datetime.strptime(item, 'Date: %Y-%m-%d %H:%M UTC') params['publishedDate'] = date - except: + except: # pylint: disable=bare-except pass elif item.startswith('Comment:'): params['content'] = item |