Auto-claim free games from Epic Games Store. 2026 latest page adaptation with persistent login state, completes the full claim process (Get → Place Order → Confirm). 自动领取 Epic Games Store 每周免费游戏。2026年最新页面适配,支持持久化登录状态, 自动完成完整领取流程(获取 → 下订单 → 确认领取)。
Auto-claim weekly free games from Epic Games Store.
自动领取 Epic Games Store 每周免费游戏。
English:
中文:
data-testid selectors / 使用稳定的 data-testid 选择器# First time login (manual login required) / 首次登录(需要手动登录一次)
python scripts/claim.py --login
# Auto-claim free games / 自动领取免费游戏
python scripts/claim.py
# Show browser window (for captcha handling) / 显示浏览器窗口(用于处理验证码)
python scripts/claim.py --headed
# View help / 查看帮助
python scripts/claim.py --help
python scripts/claim.py --login
Opens browser window for manual Epic login. After login, auth state is saved to epic_auth.json.
打开浏览器窗口,手动登录 Epic 账号。登录完成后,登录状态会保存到 epic_auth.json。
python scripts/claim.py
Automatically:
Set up cron for weekly auto-claim:
设置定时任务,每周四自动领取:
# Every Thursday at 00:20 / 每周四 00:20 执行
20 0 * * 4 cd /path/to/epic-free-games && python scripts/claim.py
| Argument | Description |
|---|---|
--login | First-time login mode / 首次登录模式 |
--headed | Show browser window / 显示浏览器窗口 |
--timeout N | Wait timeout in seconds / 等待超时时间(秒) |
--auth-file FILE | Auth state file path / 登录状态文件路径 |
epic-free-games/
├── SKILL.md # This file / 本说明文件
├── scripts/
│ └── claim.py # Main script / 主脚本
└── epic_auth.json # Auth state (auto-generated) / 登录状态缓存(自动生成)
Install / 安装:
npm install -g agent-browser
agent-browser install
--headed for manual handling / 无法自动绕过,使用 --headed 手动处理--login if session expires / 登录过期时重新运行 --loginIMPORTANT: This skill does NOT contain any pre-filled authentication files.
重要:本技能不包含任何预填充的认证文件。
Generate Your Own Auth File / 自行生成认证文件
python scripts/claim.py --login to create your own epic_auth.jsonKeep Auth File Private / 保护认证文件
epic_auth.json to .gitignore if using gitIsolated Environment / 隔离环境
Never Commit Sensitive Files / 不要提交敏感文件
# These files should NEVER be in the distribution:
# 以下文件绝对不应出现在分发包中:
- epic_auth.json
- browser-profile/
- browser_profile/
- *.png (screenshots may contain sensitive info)
Use .gitignore / 使用 .gitignore
.gitignore file to prevent accidental commits.gitignore 文件,防止意外提交Security First / 安全第一
Epic 网站使用 Cloudflare 验证检测自动化访问。使用 --headed 显示浏览器窗口手动处理验证:
# 显示浏览器窗口 + 禁用自动化检测标志
agent-browser --headed --session epic \
--args "--disable-blink-features=AutomationControlled" \
open "https://store.epicgames.com/zh-CN/free-games"
agent-browser --session epic snapshot -i # 查看页面快照
agent-browser --session epic click "ref=e55" # 点击元素
agent-browser --session epic close # 关闭浏览器
问题描述:游戏页面的"获取"按钮可能不在首屏可视区域内,需要向下滚动才能看到。
解决方案:
# 先滚动页面,再查找获取按钮
agent-browser --session epic scroll down 300
agent-browser --session epic snapshot -i --json
# 查找 "获取" 按钮的 ref 值,然后点击
agent-browser --session epic click "ref=e50"
最佳实践:每次打开游戏页面后,先截图确认"获取"按钮是否可见,如不可见则滚动页面。
问题描述:每次运行都需要重新登录,因为登录状态没有保存到文件。
解决方案:
# 登录成功后,保存登录状态到文件
agent-browser --session epic state save "epic_auth.json"
# 下次运行时加载登录状态
agent-browser --session epic state load "epic_auth.json"
问题描述:默认的自动化浏览器会被 Cloudflare 检测并拦截。
解决方案:使用 --args 参数禁用自动化检测标志:
agent-browser --session epic --headed \
--args "--disable-blink-features=AutomationControlled" \
open "https://store.epicgames.com/zh-CN/free-games"
问题描述:点击"获取"按钮后会弹出结账窗口,需要勾选协议复选框。
解决方案:
# 等待结账弹窗出现
agent-browser --session epic wait 3000
# 勾选协议复选框(checkbox 类型元素)
agent-browser --session epic check "ref=e134"
# 点击"下订单"按钮
agent-browser --session epic click "ref=e132"
# 1. 打开浏览器(带反自动化检测)
agent-browser --session epic --headed \
--args "--disable-blink-features=AutomationControlled" \
open "https://store.epicgames.com/zh-CN/free-games"
# 2. 等待页面加载
agent-browser --session epic wait 3000
# 3. 截图确认页面状态
agent-browser --session epic screenshot
# 4. 获取游戏链接
agent-browser --session epic eval "document.querySelector('a[href*=\"游戏名\"]')?.href"
# 5. 打开游戏页面
agent-browser --session epic open "游戏链接"
# 6. 滚动到获取按钮位置
agent-browser --session epic scroll down 300
# 7. 点击获取按钮
agent-browser --session epic click "ref=获取按钮ref"
# 8. 处理结账弹窗
agent-browser --session epic wait 3000
agent-browser --session epic check "协议复选框ref"
agent-browser --session epic click "下订单按钮ref"
# 9. 保存登录状态
agent-browser --session epic state save "epic_auth.json"
MIT License - Use at your own risk / 使用风险自负