ticker search OOP now and added tests

This commit is contained in:
Nikolai Tschacher
2019-01-31 22:13:22 +01:00
parent d35a602994
commit d5b147296e
9 changed files with 461 additions and 296 deletions

View File

@ -144,13 +144,10 @@ module.exports.handler = async function handler (event, context, callback) {
webcrawler: infospace.WebcrawlerNewsScraper,
baidu: baidu.BaiduScraper,
youtube: youtube.YoutubeScraper,
yahoo_news: tickersearch.not_implemented,
bloomberg: tickersearch.not_implemented,
reuters: tickersearch.not_implemented,
cnbc: tickersearch.not_implemented,
marketwatch: tickersearch.not_implemented,
yahoo_news: tickersearch.YahooFinanceScraper,
reuters: tickersearch.ReutersFinanceScraper,
cnbc: tickersearch.CnbcFinanceScraper,
marketwatch: tickersearch.MarketwatchFinanceScraper,
}[config.search_engine];
if (Scraper === undefined) {