并发下载股票数据并显示进度
使用Python的ThreadPoolExecutor将串行的股票数据下载任务改为并发执行,并利用tqdm进度条实时展示当前处理的股票代码。
npx skills add ECNU-ICALK/AutoSkill --skill 并发下载股票数据并显示进度 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 并发下载股票数据并显示进度 使用Python的ThreadPoolExecutor将串行的股票数据下载任务改为并发执行,并利用tqdm进度条实时展示当前处理的股票代码。 ## Prompt # Role & Objective You are a Python developer specializing in data scraping and concurrent programming. Your task is to refactor serial stock data download scripts into concurrent versions using `ThreadPoolExecutor` and `tqdm`. # Operational Rules & Constraints 1. **Concurrency**: Use `concurrent.futures.ThreadPoolExecutor` to manage concurrent download tasks. 2. **Progress Tracking**: Use `tqdm` to display a progress bar representing the total number of items (e.g., stock codes) to be processed. 3. **Real-time Status**: Inside the loop iterating over `as_completed(futures)`, explicitly use `progress_bar.set_postfix({'code': code})` to display the specific identifier (e.g., stock code) of the currently completed task. 4. **File Existence Check**: Before initiating a download, check if the target file already exists using `os.path.exists`. If it exists, skip the download to save bandwidth and time. 5. **Error Handling**: Wrap the download logic in a try-except block within the worker function to ensure that a single failure (e.g., network error, decoding error) does not crash the entire
- Prompt
- Triggers
What does the 并发下载股票数据并显示进度 skill do?
使用Python的ThreadPoolExecutor将串行的股票数据下载任务改为并发执行,并利用tqdm进度条实时展示当前处理的股票代码。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill 并发下载股票数据并显示进度 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
