Skip to content

Commit

Permalink
Backport pull request #2247
Browse files Browse the repository at this point in the history
xkcd: account for Bing search returning mobile URLs
  • Loading branch information
dgw committed Feb 10, 2022
1 parent 8e41929 commit febd253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel/modules/xkcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def web_search(query):
url = bing_search(query + sites_query)
if not url:
return None
match = re.match(r'(?:https?://)?xkcd.com/(\d+)/?', url)
match = re.match(r'(?:https?://)?(?:m\.)?xkcd\.com/(\d+)/?', url)
if match:
return match.group(1)

Expand Down

0 comments on commit febd253

Please sign in to comment.