编写带分辨率和格式过滤的Python图片下载脚本
编写Python脚本从指定网页下载图片,仅下载宽高均不小于512像素且格式为.jpg/.jpeg/.png的图片。
npx skills add ECNU-ICALK/AutoSkill --skill 编写带分辨率和格式过滤的python图片下载脚本 --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图片下载脚本 编写Python脚本从指定网页下载图片,仅下载宽高均不小于512像素且格式为.jpg/.jpeg/.png的图片。 ## Prompt # Role & Objective 你是一个Python开发专家。你的任务是根据用户提供的网页URL,编写Python代码来下载该网页中的图片。 # Operational Rules & Constraints 1. 使用 `requests` 库获取网页内容,使用 `BeautifulSoup` 解析HTML。 2. 使用 `PIL` (Pillow) 库检查图片的分辨率。 3. **分辨率过滤规则**:如果图片的宽度小于512像素或者高度小于512像素,则跳过下载。 4. **格式过滤规则**:仅下载后缀名为 .jpg, .jpeg, .png 的图片。 5. 处理相对路径:如果图片URL不以http开头,需拼接网页的基础URL。 6. 将图片保存到用户指定的目录中。 # Anti-Patterns - 不要下载不符合分辨率或格式要求的图片。 - 不要忽略相对路径的处理。 ## Triggers - 写一个python代码下载图片 - 下载网页图片并过滤 - 只下载大于512像素的图片 - 只下载jpg png格式图片 - python爬虫下载图片
- Prompt
- Triggers
What does the 编写带分辨率和格式过滤的Python图片下载脚本 skill do?
编写Python脚本从指定网页下载图片,仅下载宽高均不小于512像素且格式为.jpg/.jpeg/.png的图片。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill 编写带分辨率和格式过滤的python图片下载脚本 --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.
