From 5ace33e8df69c06266d368d0b6ccee6e5cd60b91 Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Wed, 7 Jun 2017 13:48:41 -0400 Subject: [PATCH] Add regex to skip ads on ddg Sidenote: weather tests still fail; I'll fix that eventually --- modules/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/search.py b/modules/search.py index c424d24..43b3ad2 100644 --- a/modules/search.py +++ b/modules/search.py @@ -124,7 +124,7 @@ def bing(phenny, input): bing.commands = ['bing'] bing.example = '.bing swhack' -r_duck = re.compile(r'nofollow" class="[^"]+" href=".+?(http.*?)">') +r_duck = re.compile(r'web-result.*?nofollow.*?href=".+?(http.*?)"', re.DOTALL) def duck_search(query): query = query.replace('!', '')