diff options
author | stepshal <nessento@openmailbox.org> | 2016-07-11 20:29:47 +0700 |
---|---|---|
committer | stepshal <nessento@openmailbox.org> | 2016-07-11 23:53:13 +0700 |
commit | b3ab221b9808ba2b7b01d417210af9b9527e661c (patch) | |
tree | 6ee035fb32906228376d9473e8524e8ed2be745a /searx/engines/startpage.py | |
parent | 3fd405dcd3fd46d5b6f2fe1df625eedf0f1fbe02 (diff) | |
download | searxng-b3ab221b9808ba2b7b01d417210af9b9527e661c.tar.gz searxng-b3ab221b9808ba2b7b01d417210af9b9527e661c.zip |
Fix anomalous backslash in string
Diffstat (limited to 'searx/engines/startpage.py')
-rw-r--r-- | searx/engines/startpage.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py index 52dd0b92f..d8b702c4d 100644 --- a/searx/engines/startpage.py +++ b/searx/engines/startpage.py @@ -68,15 +68,15 @@ def response(resp): url = link.attrib.get('href') # block google-ad url's - if re.match("^http(s|)://(www\.)?google\.[a-z]+/aclk.*$", url): + if re.match(r"^http(s|)://(www\.)?google\.[a-z]+/aclk.*$", url): continue # block startpage search url's - if re.match("^http(s|)://(www\.)?startpage\.com/do/search\?.*$", url): + if re.match(r"^http(s|)://(www\.)?startpage\.com/do/search\?.*$", url): continue # block ixquick search url's - if re.match("^http(s|)://(www\.)?ixquick\.com/do/search\?.*$", url): + if re.match(r"^http(s|)://(www\.)?ixquick\.com/do/search\?.*$", url): continue title = escape(extract_text(link)) @@ -89,7 +89,7 @@ def response(resp): published_date = None # check if search result starts with something like: "2 Sep 2014 ... " - if re.match("^([1-9]|[1-2][0-9]|3[0-1]) [A-Z][a-z]{2} [0-9]{4} \.\.\. ", content): + if re.match(r"^([1-9]|[1-2][0-9]|3[0-1]) [A-Z][a-z]{2} [0-9]{4} \.\.\. ", content): date_pos = content.find('...') + 4 date_string = content[0:date_pos - 5] published_date = parser.parse(date_string, dayfirst=True) @@ -98,7 +98,7 @@ def response(resp): content = content[date_pos:] # check if search result starts with something like: "5 days ago ... " - elif re.match("^[0-9]+ days? ago \.\.\. ", content): + elif re.match(r"^[0-9]+ days? ago \.\.\. ", content): date_pos = content.find('...') + 4 date_string = content[0:date_pos - 5] |