summaryrefslogtreecommitdiff
path: root/searx/engines/youtube_noapi.py
diff options
context:
space:
mode:
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', '')