summaryrefslogtreecommitdiff
path: root/searx/engines/youtube_noapi.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-03-11 07:45:08 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-03-11 14:55:38 +0100
commit8205f170ff983e5240d32dc17d7fdb526ebe5fe7 (patch)
tree536acda827bcdd1a6668714855e6f6c3ba6b68d4 /searx/engines/youtube_noapi.py
parent707d6270c80426b54aeaa0ac0acd80ded45df533 (diff)
downloadsearxng-8205f170ff983e5240d32dc17d7fdb526ebe5fe7.tar.gz
searxng-8205f170ff983e5240d32dc17d7fdb526ebe5fe7.zip
[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/youtube_noapi.py')
-rw-r--r--searx/engines/youtube_noapi.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/searx/engines/youtube_noapi.py b/searx/engines/youtube_noapi.py
index 7992adf82..b015dff8d 100644
--- a/searx/engines/youtube_noapi.py
+++ b/searx/engines/youtube_noapi.py
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
-"""
- Youtube (Videos)
+"""Youtube (Videos)
+
"""
from functools import reduce
@@ -101,7 +101,7 @@ def parse_next_page_response(response_text):
"key": "next_page_token",
}
)
- except:
+ except: # pylint: disable=bare-except
pass
return results
@@ -167,5 +167,4 @@ def parse_first_page_response(response_text):
def get_text_from_json(element):
if 'runs' in element:
return reduce(lambda a, b: a + b.get('text', ''), element.get('runs'), '')
- else:
- return element.get('simpleText', '')
+ return element.get('simpleText', '')