on master help sign in
Merge branch 'master' of https://github.com/asciimoo/searx into filtron
commit4b4e95f2c3ebf4858a370f2c91783104afc1e198 authorMarkus Heiser <markus.heiser@darmarit.de> dateSun 19 Apr 2020, 12:03 (7 years ago) parentf2ca12b826ef3d
2 files changed+13−10
requirements.txt+8−8 searx/engines/startpage.py+5−2
requirements.txt+8−8
@@ -1,12 +1,12 @@
1−certifi==2019.3.9
1+certifi==2020.4.5.1
22babel==2.7.0
33flask-babel==1.0.0
4−flask==1.0.2
5−idna==2.8
6−jinja2==2.10.1
7−lxml==4.3.3
4+flask==1.1.2
5+idna==2.9
6+jinja2==2.11.1
7+lxml==4.5.0
88pygments==2.1.3
9−pyopenssl==19.0.0
9+pyopenssl==19.1.0
1010python-dateutil==2.8.0
11−pyyaml==5.1
12−requests[socks]==2.22.0
11+pyyaml==5.3.1
12+requests[socks]==2.23.0
searx/engines/startpage.py+5−2
@@ -99,11 +99,14 @@ def response(resp):
9999 if re.match(r"^([1-9]|[1-2][0-9]|3[0-1]) [A-Z][a-z]{2} [0-9]{4} \.\.\. ", content):
100100 date_pos = content.find('...') + 4
101101 date_string = content[0:date_pos - 5]
102− published_date = parser.parse(date_string, dayfirst=True)
103−
104102 # fix content string
105103 content = content[date_pos:]
106104
105+ try:
106+ published_date = parser.parse(date_string, dayfirst=True)
107+ except ValueError:
108+ pass
109+
107110 # check if search result starts with something like: "5 days ago ... "
108111 elif re.match(r"^[0-9]+ days? ago \.\.\. ", content):
109112 date_pos = content.find('...') + 4