summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-11-26 15:38:07 +0100
committerAlexandre Flament <alex@al-f.net>2020-12-03 10:22:48 +0100
commitde887c6347db4c810f7d1e11c77633340d4e2fbd (patch)
treeb052c3cfc7f50f8649fb3df79f709306930885c4 /searx/utils.py
parent1d0c368746e0ae28ea042edaf4c75ee3a2b738c2 (diff)
downloadsearxng-de887c6347db4c810f7d1e11c77633340d4e2fbd.tar.gz
searxng-de887c6347db4c810f7d1e11c77633340d4e2fbd.zip
[mod] bing_news: use eval_xpath_getindex
remove unused function searx.utils.list_get
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 80cb556fd..057e9d004 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -269,24 +269,6 @@ def dict_subset(d, properties):
return result
-def list_get(a_list, index, default=None):
- """Get element in list or default value
- Examples:
- >>> list_get(['A', 'B', 'C'], 0)
- 'A'
- >>> list_get(['A', 'B', 'C'], 3)
- None
- >>> list_get(['A', 'B', 'C'], 3, 'default')
- 'default'
- >>> list_get(['A', 'B', 'C'], -1)
- 'C'
- """
- if len(a_list) > index:
- return a_list[index]
- else:
- return default
-
-
def get_torrent_size(filesize, filesize_multiplier):
"""