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 Content Downloader

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

Overview

Concrete tool for downloading Eastmoney (guba.eastmoney.com) news article contents via multiprocessing web scraping with proxy support provided by the FinGPT Sentiment Analysis v1 subproject.

Description

The download_contents module reads a CSV of news titles with content links, scrapes each article page from Eastmoney's Guba forum, extracts JSON-embedded content from script tags, and saves the enriched DataFrame. It supports KuaiDaili tunnel proxies and multiprocessing for parallel fetching with retry logic.

Usage

Run as a script when you need to enrich Eastmoney news title datasets with full article content. Requires pre-existing title CSVs.

Code Reference

Source Location

Signature

def get_one_content(x) -> pd.Series | None:
    """Fetch a single Eastmoney Guba article and extract its content JSON.

    Args:
        x: DataFrame row with 'content link' column

    Returns:
        pd.Series of extracted content or None on failure
    """

Import

# Script — invoke directly after setting result paths
# python download_contents.py

I/O Contract

Inputs

Name Type Required Description
result_path str Yes Directory with title-only CSVs
result_with_content_path str Yes Output directory for enriched CSVs
KUAIDAILI_TUNNEL str No Proxy tunnel env var

Outputs

Name Type Description
enriched CSVs files Title CSVs with added content column

Usage Examples

Download Article Contents

from download_contents import get_one_content
import pandas as pd

titles_df = pd.read_csv("results/600519.csv")
content = get_one_content(titles_df.iloc[0])
if content is not None:
    print(content.get("post_content", "")[:200])

Related Pages

Page Connections

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