nytimes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNew York Times Skill
New York Times Skill
Access premium journalism and news coverage from The New York Times.
获取《纽约时报》的优质新闻报道内容。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/nytimes/install.sh | bashOr manually:
bash
cp -r skills/nytimes ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/nytimes/install.sh | bash或者手动安装:
bash
cp -r skills/nytimes ~/.canifi/skills/Setup
配置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set NYTIMES_API_KEY "your_api_key"
canifi-env set NYTIMES_EMAIL "your_email"
canifi-env set NYTIMES_PASSWORD "your_password"
undefinedcanifi-env set NYTIMES_API_KEY "your_api_key"
canifi-env set NYTIMES_EMAIL "your_email"
canifi-env set NYTIMES_PASSWORD "your_password"
undefinedPrivacy & Authentication
隐私与身份验证
Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,由您掌控。 Canifi LifeOS 尊重您的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
- 使用CDP模式完成浏览器自动化配置
- 在Playwright控制的Chrome窗口中手动登录该服务
- Claude将使用您的已认证会话,且绝不会看到您的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭据仅能在您的本地机器上访问,绝不会被传输。
Capabilities
功能
- Article Access: Read articles across news, opinion, and feature sections
- Section Browsing: Browse by section including World, Politics, Business, Tech
- Search Archives: Search the complete NYT archive dating back to 1851
- Saved Articles: Save articles to your account for later reading
- Newsletter Management: Subscribe to and manage NYT newsletters
- 文章访问:阅读新闻、观点和特稿板块的文章
- 板块浏览:按板块浏览,包括国际、政治、商业、科技等
- 档案搜索:搜索1851年至今的完整《纽约时报》档案
- 文章收藏:将文章保存到您的账户以便稍后阅读
- 通讯管理:订阅和管理《纽约时报》的通讯
Usage Examples
使用示例
Get Top Stories
获取头条新闻
User: "Show me today's top stories from the New York Times"
Assistant: Returns top headlines from the home section用户:“给我展示今天《纽约时报》的头条新闻”
助手:返回首页板块的头条标题Search Articles
搜索文章
User: "Search NYT for articles about artificial intelligence from the last month"
Assistant: Returns matching articles with headlines and summaries用户:“搜索《纽约时报》过去一个月关于人工智能的文章”
助手:返回匹配的文章及标题和摘要Browse Section
浏览板块内容
User: "Show me the latest NYT Technology articles"
Assistant: Returns recent technology section articles用户:“给我展示《纽约时报》最新的科技板块文章”
助手:返回近期科技板块的文章Save Article
收藏文章
User: "Save this NYT article to my account"
Assistant: Saves article to your NYT saved list用户:“把这篇《纽约时报》的文章保存到我的账户”
助手:将文章保存到您的《纽约时报》收藏列表Authentication Flow
身份验证流程
- Register for API key at developer.nytimes.com
- API key provides access to article search and top stories
- Full article access requires subscription
- Use credentials for authenticated features
- 在developer.nytimes.com注册获取API密钥
- API密钥可用于访问文章搜索和头条新闻功能
- 完整文章访问需要订阅权限
- 使用凭据访问需身份验证的功能
Error Handling
错误处理
| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid API key | Verify API key |
| 403 Forbidden | Subscription required | Subscribe to access full articles |
| 429 Rate Limited | API limit exceeded | Wait and retry with backoff |
| 404 Not Found | Article not found | Check article URL or ID |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| 401 未授权 | API密钥无效 | 验证API密钥 |
| 403 禁止访问 | 需要订阅权限 | 订阅以访问完整文章 |
| 429 请求受限 | 超出API请求限制 | 等待后重试,采用退避策略 |
| 404 未找到 | 文章不存在 | 检查文章URL或ID |
Notes
注意事项
- Free API tier: 500 requests/day, 5 requests/minute
- Subscription required for full article access
- Archive API covers 1851 to present
- Games and Cooking require separate subscriptions
- Wirecutter reviews included with subscription
- 免费API层级:每日500次请求,每分钟5次请求
- 完整文章访问需要订阅
- 档案API覆盖1851年至今的内容
- 游戏和烹饪板块需要单独订阅
- Wirecutter评测包含在订阅服务中