Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AI4Finance Foundation FinGPT Eastmoney Title Downloader

From Leeroopedia
Knowledge Sources
Domains Data_Acquisition, News_Download, Chinese_Market
Last Updated 2026-10-18 00:00 GMT

Overview

Concrete tool for downloading Eastmoney news titles for Chinese A-share stocks using FinNLP's streaming downloader with multiprocessing provided by the FinGPT Sentiment Analysis v1 subproject.

Description

The download_titles module reads a stock code list from CSV, uses FinNLP's `Eastmoney_Streaming` downloader with KuaiDaili proxy support, and fetches news titles for each stock in parallel via a multiprocessing pool. It skips already-downloaded stocks to avoid redundant work.

Usage

Run as a script when you need to bulk-download Eastmoney news titles for a list of A-share stocks. Requires FinNLP and optional KuaiDaili proxy credentials.

Code Reference

Source Location

Signature

def get_news_data(stock):
    """Download Eastmoney news titles for one A-share stock.

    Args:
        stock: 6-digit stock code string

    Returns:
        pd.DataFrame of news data, or None if already downloaded
    """

Import

# Script — invoke directly
# python download_titles.py

I/O Contract

Inputs

Name Type Required Description
hs_300.csv CSV Yes Stock list with SECURITY_CODE column
config dict Yes Proxy config (use_proxy, max_retry, tunnel, credentials)
result_path str Yes Output directory for per-stock CSVs

Outputs

Name Type Description
per-stock CSVs files One CSV per stock with news titles

Usage Examples

Download Titles for Multiple Stocks

import multiprocessing as mp
from download_titles import get_news_data

stocks = ["000001", "600519", "000858"]
pool = mp.Pool(processes=5)
for stock in stocks:
    pool.apply_async(get_news_data, args=(stock,))
pool.close()
pool.join()

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment