mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
707d6270c8
commit
8205f170ff
155 changed files with 166 additions and 258 deletions
|
|
@ -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 urllib.parse import urlencode
|
||||
from lxml import html
|
||||
from datetime import datetime
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from lxml import html
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue