예제 #1
0
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......")
예제 #2
0
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......")
예제 #3
0
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......")
예제 #4
0
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......")