def test_get_availible_engines(self): engines = util.get_availible_engines() self.assertTrue("Google Scholar" in engines) engine = engines["Google Scholar"]() self.assertTrue(isinstance(engine, GoogleScholar))
def run(engine, criteria, num_results=20): availible_engines = util.get_availible_engines() results = [] instance = availible_engines[engine]() results.extend(instance.search(criteria.split(" "), num_results)) return results