def discover(language):
debug('<STR_LIT>' % (language,))<EOL>global scrapers, discovered<EOL>for language in scrapers.iterkeys():<EOL><INDENT>discovered[language] = {}<EOL>for scraper in scrapers[language]:<EOL><INDENT>blacklist = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>methods = [method for method in dir(scraper) if method not in blacklist and not method.startswith('<STR_LIT:_>') and callable(getattr(scraper, method))]<EOL>for method in methods:<EOL><INDENT>if discovered[language].has_key(method):<EOL><INDENT>discovered[language][method].append(scraper)<EOL><DEDENT>else:<EOL><INDENT>discovered[language][method] = [scraper]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>debug('<STR_LIT>' % (len(scrapers[language]), len(discovered[language].keys()), language))<EOL>
Discovers all registered scrapers to be used for the generic scraping interface.