xkcd: switch to DDG for keyword lookup #2376
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Bing has become supremely unreliable. In a shocking turn of events, it seems that DuckDuckGo no longer vomits on the long string of
-site:
operators used in this plugin.Current
master
:With this patch:
Checklist
make qa
(runsmake quality
andmake test
)Notes
Someone else can investigate backporting this to 7.1.x if they like, but it's easy enough for someone to just use the newer
xkcd.py
in an old bot if they want. Thesopel.modules.search
stuff hasn't really changed. I don't particularly want to spend time on things that don't progress 8.0 at this point.This is the simplest, fastest way to get
.xkcd some keywords
working again, because.ddg
output works as expected. I might still try to fix Bing search separately… Had some small amount of success by fussing with the user agent Sopel sends, but it still wouldn't reliably obeysite:
operators. (It's probably picking up ads on the page; I would bet the HTML has changed.)