File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,12 @@ def bing(bot, trigger):
134134 if result :
135135 bot .say (result )
136136 else :
137- bot .reply ("No results found for '%s'." % query )
137+ msg = "No results found for '%s'." % query
138+ if query .count ('site:' ) >= 2 :
139+ # This check exists because of issue #1415. The git.io link will take the user there.
140+ # (Better a sopel.chat link, but it's not set up to do that. This is shorter anyway.)
141+ msg += " Try again with at most one 'site:' operator. See https://git.io/fpKtP for why."
142+ bot .reply (msg )
138143
139144
140145@plugin .command ('search' )
@@ -149,7 +154,15 @@ def search(bot, trigger):
149154 bu = bing_search (query ) or '-'
150155 du = duck_search (query ) or '-'
151156
152- if bu == du :
157+ if bu == '-' and du == '-' :
158+ msg = "No results found for '%s'." % query
159+ if query .count ('site:' ) >= 2 :
160+ # This check exists because of issue #1415. The git.io link will take the user there.
161+ # (Better a sopel.chat link, but it's not set up to do that. This is shorter anyway.)
162+ msg += " Try again with at most one 'site:' operator. See https://git.io/fpKtP for why."
163+ bot .reply (msg )
164+ return
165+ elif bu == du :
153166 result = '%s (b, d)' % bu
154167 else :
155168 if len (bu ) > 150 :
You can’t perform that action at this time.
0 commit comments