self.search_list.pop(0)
raise
- if 'results' not in response or not response['results']:
+ if not response.get('results', []):
+ if response.get("unresponsive_engines", []):
+ logger.debug("drop search engine, probably has issues: %s", self.search_list[0])
+ self.search_list.pop(0)
+ return self.searx(text)
+ logger.info("No results found, response: %s", response)
return
+
return [(r.get('content', ''), r['url'], url) for r in response['results']][0]
def parse_body(self, msg):
name="distbot",
version=0.1,
description="the distributed bot",
- install_requires=["sleekxmpp", "pika", "flask", 'configobj', 'requests', 'lxml'],
+ install_requires=["sleekxmpp", "pika==0.12.0", "flask", 'configobj', 'requests', 'lxml'],
test_requires=["pytest"],
extras_require={
'test': ["pytest"],