Skip to content

Commit

Permalink
search: tweak ad result blocking
Browse files Browse the repository at this point in the history
A slight regex change to avoid yahoo ad results from duck duck go if it ends up using the HTML search
  • Loading branch information
dasu authored and maxpowa committed Apr 25, 2016
1 parent 45d0f20 commit 2e50d5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel/modules/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def bing_search(query, lang='en-GB'):
if m:
return m.group(1)

r_duck = re.compile(r'nofollow" class="[^"]+" href="(.*?)">')
r_duck = re.compile(r'nofollow" class="[^"]+" href="(?!https?:\/\/r\.search\.yahoo)(.*?)">')


def duck_search(query):
Expand Down

0 comments on commit 2e50d5f

Please sign in to comment.