Skip to content

Commit

Permalink
[search] remove Bing support
Browse files Browse the repository at this point in the history
It barely works: outputs unnecessarily long links which are never relevant to what you're looking for.
Also, nobody uses bing apart from Microsoft employees (and they only do so because company policy forces them to do so)
  • Loading branch information
Elad Alfassa committed Jun 6, 2013
1 parent 2e3a9da commit f8ce5af
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions search.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,30 +119,8 @@ def bing_search(query, lang='en-GB'):
if m:
return m.group(1)


def bing(bot, trigger):
"""Queries Bing for the specified input."""
query = trigger.group(2)
if query.startswith(':'):
lang, query = query.split(' ', 1)
lang = lang[1:]
else:
lang = 'en-GB'
if not query:
return bot.reply('.bing what?')

uri = bing_search(query, lang)
if uri:
bot.reply(uri)
bot.memory['last_seen_url'][trigger.sender] = uri
else:
bot.reply("No results found for '%s'." % query)
bing.commands = ['bing']
bing.example = '.bing swhack'

r_duck = re.compile(r'nofollow" class="[^"]+" href="(.*?)">')


def duck_search(query):
query = query.replace('!', '')
query = web.quote(query)
Expand Down

0 comments on commit f8ce5af

Please sign in to comment.