def go_google(): logger.info("crawl google finance start......") source_type = SOURCE_TYPE_GOOGLE code_names_file = 'code_name_vol.lst' url_prefix = 'https://www.google.com/finance/company_news?q=' req_referer = 'https://www.google.com/finance' finance_home = ['https://www.google.com/finance','https://news.google.com/news/section?ned=us&topic=b'] extracteNewsurls = GoogleExtracteNewsurls() go_newsextrac(source_type,code_names_file,url_prefix,req_referer,finance_home,extracteNewsurls) logger.info("crawl google finance end......")
def go_yahoo(): logger.info("crawl yahoo finance start......") source_type = SOURCE_TYPE_YAHOO code_names_file = 'code_name_vol.lst' url_prefix = 'http://finance.yahoo.com/q/h?s=' req_referer = 'http://finance.yahoo.com/' finance_homes = ['http://finance.yahoo.com/'] extracteNewsurls = YahooExtracteNewsurls() go_newsextrac(source_type,code_names_file,url_prefix,req_referer,finance_homes,extracteNewsurls) logger.info("crawl yahoo finance end......")
def go_yahoo(): logger.info("crawl yahoo finance start......") source_type = SOURCE_TYPE_YAHOO code_names_file = 'code_name_vol.lst' url_prefix = 'http://finance.yahoo.com/q/h?s=' req_referer = 'http://finance.yahoo.com/' finance_homes = ['http://finance.yahoo.com/'] extracteNewsurls = YahooExtracteNewsurls() go_newsextrac(source_type, code_names_file, url_prefix, req_referer, finance_homes, extracteNewsurls) logger.info("crawl yahoo finance end......")
def go_google(): logger.info("crawl google finance start......") source_type = SOURCE_TYPE_GOOGLE code_names_file = 'code_name_vol.lst' url_prefix = 'https://www.google.com/finance/company_news?q=' req_referer = 'https://www.google.com/finance' finance_home = [ 'https://www.google.com/finance', 'https://news.google.com/news/section?ned=us&topic=b' ] extracteNewsurls = GoogleExtracteNewsurls() go_newsextrac(source_type, code_names_file, url_prefix, req_referer, finance_home, extracteNewsurls) logger.info("crawl google finance end......")