一键导入
implement-scraper-feature
A complete guide to adding a new data field to the CSFD scraper (e.g., extracting "budget" or "studio" from a movie page).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
A complete guide to adding a new data field to the CSFD scraper (e.g., extracting "budget" or "studio" from a movie page).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
A workflow to verify that code changes (refactoring, new features) didn't break the scraper or the build.
How to expose a CSFD scraper function as a tool for AI agents via the Model Context Protocol server.
基于 SOC 职业分类
| name | Implement Scraper Feature |
| description | A complete guide to adding a new data field to the CSFD scraper (e.g., extracting "budget" or "studio" from a movie page). |
This skill guides you through the process of extracting a new piece of data from CSFD.cz.
First, you need to find where the data is located in the HTML.
curl or open the page in a browser to inspect the element.Define the shape of the new data.
src/dto/[entity].ts (e.g., src/dto/movie.ts)export interface CSFDMovie {
// ... existing fields
newField: string | null;
}
CRITICAL: Never write parsing logic inside the Service. Always use a helper.
File: src/helpers/[entity].helper.ts
Action: Create a pure function exported from the helper file.
import { HTMLElement } from 'node-html-parser';
export const getNewField = (el: HTMLElement): string | null => {
const node = el.querySelector('.some-class');
return node ? node.innerText.trim() : null;
};
src/services/[entity].service.tsbuild[Entity] method.
// inside buildMovie method
return {
// ...
newField: getNewField(el)
};
npm run demo (you might need to modify demo.ts to log the new field).