diff options
author | dalf <alex@al-f.net> | 2015-01-17 21:54:40 +0100 |
---|---|---|
committer | dalf <alex@al-f.net> | 2015-01-17 21:54:40 +0100 |
commit | b6d27aca590c034710544a982bca2b71abb878c5 (patch) | |
tree | 6e7a05a8f08304145364240abec493575a92fe44 /searx/utils.py | |
parent | a865e6672fa2a289937ff378e8893c19f71c5e0c (diff) | |
download | searxng-b6d27aca590c034710544a982bca2b71abb878c5.tar.gz searxng-b6d27aca590c034710544a982bca2b71abb878c5.zip |
[enh] image-proxy : handle ETag and date related headers, add hash to URL
Diffstat (limited to 'searx/utils.py')
-rw-r--r-- | searx/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/searx/utils.py b/searx/utils.py index 0b4de9410..89128d506 100644 --- a/searx/utils.py +++ b/searx/utils.py @@ -206,3 +206,11 @@ def format_date_by_locale(date_string, locale_string): except: logger.warning('cannot set original locale: {0}'.format(orig_locale)) return formatted_date + + +def dict_subset(d, properties): + result = {} + for k in properties: + if k in d: + result[k] = d[k] + return result |