mirror of
https://github.com/idealzhou1/bing-auto-rewards.git
synced 2025-12-17 07:18:31 +08:00
Add files via upload
This commit is contained in:
39
.gitignore
vendored
Normal file
39
.gitignore
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# 敏感配置文件
|
||||||
|
accounts.json
|
||||||
|
config/accounts.json
|
||||||
|
|
||||||
|
# 日志文件
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# 截图文件
|
||||||
|
*.png
|
||||||
|
|
||||||
|
# Python缓存
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# 虚拟环境
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# IDE文件
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# 临时文件
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
temp/
|
||||||
|
tmp/
|
||||||
|
|
||||||
|
# Chrome用户数据目录
|
||||||
|
chrome_*/
|
||||||
|
|
||||||
|
# 系统文件
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
148
GitHub部署说明.md
Normal file
148
GitHub部署说明.md
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
# GitHub Actions 部署详细说明
|
||||||
|
|
||||||
|
## 步骤1: 创建GitHub仓库
|
||||||
|
|
||||||
|
1. 登录你的GitHub账户
|
||||||
|
2. 点击右上角的 "+" 号,选择 "New repository"
|
||||||
|
3. 仓库名称填写:`bing-auto-rewards`
|
||||||
|
4. 选择 "Public" 或 "Private"(建议Private保护账号安全)
|
||||||
|
5. 勾选 "Add a README file"
|
||||||
|
6. 点击 "Create repository"
|
||||||
|
|
||||||
|
## 步骤2: 上传代码
|
||||||
|
|
||||||
|
### 方法1: 使用Git命令行
|
||||||
|
```bash
|
||||||
|
# 克隆你的仓库
|
||||||
|
git clone https://github.com/你的用户名/bing-auto-rewards.git
|
||||||
|
cd bing-auto-rewards
|
||||||
|
|
||||||
|
# 复制项目文件到仓库目录
|
||||||
|
# 确保包含以下文件:
|
||||||
|
# - .github/workflows/daily-checkin.yml
|
||||||
|
# - src/bingZDH.py
|
||||||
|
# - src/requirements.txt
|
||||||
|
# - README.md
|
||||||
|
# - .gitignore
|
||||||
|
|
||||||
|
# 提交代码
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit: Bing auto rewards script"
|
||||||
|
git push origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
### 方法2: 直接在GitHub网页上传
|
||||||
|
1. 在仓库页面点击 "Add file" → "Upload files"
|
||||||
|
2. 拖拽或选择项目文件
|
||||||
|
3. 填写提交信息,点击 "Commit changes"
|
||||||
|
|
||||||
|
## 步骤3: 设置GitHub Secrets
|
||||||
|
|
||||||
|
1. 进入你的仓库页面
|
||||||
|
2. 点击 "Settings" 标签
|
||||||
|
3. 左侧菜单选择 "Secrets and variables" → "Actions"
|
||||||
|
4. 点击 "New repository secret"
|
||||||
|
5. 名称填写:`ACCOUNTS_CONFIG`
|
||||||
|
6. 值填写你的账号配置JSON(注意格式要正确)
|
||||||
|
|
||||||
|
### 账号配置示例:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"group1": [
|
||||||
|
{
|
||||||
|
"email": "your_email@example.com",
|
||||||
|
"password": "your_password"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group2": [
|
||||||
|
{
|
||||||
|
"email": "another_email@example.com",
|
||||||
|
"password": "another_password"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 步骤4: 启用GitHub Actions
|
||||||
|
|
||||||
|
1. 进入你的仓库页面
|
||||||
|
2. 点击 "Actions" 标签
|
||||||
|
3. 如果看到 "Get started with GitHub Actions",点击它
|
||||||
|
4. 选择 "Skip this: Set up a workflow yourself"
|
||||||
|
5. 系统会自动检测到 `.github/workflows/daily-checkin.yml` 文件
|
||||||
|
|
||||||
|
## 步骤5: 测试运行
|
||||||
|
|
||||||
|
1. 在 "Actions" 页面,你应该能看到 "Bing Daily Check-in" 工作流
|
||||||
|
2. 点击 "Run workflow" 按钮
|
||||||
|
3. 选择 "main" 分支,点击 "Run workflow"
|
||||||
|
4. 等待执行完成,查看结果
|
||||||
|
|
||||||
|
## 步骤6: 验证自动执行
|
||||||
|
|
||||||
|
1. 工作流配置为每天UTC时间2:00(北京时间10:00)自动执行
|
||||||
|
2. 你可以在 "Actions" 页面查看执行历史
|
||||||
|
3. 每次执行都会生成日志文件作为Artifact
|
||||||
|
|
||||||
|
## 故障排除
|
||||||
|
|
||||||
|
### 常见问题1: Chrome安装失败
|
||||||
|
- 确保工作流使用 `ubuntu-latest` 运行环境
|
||||||
|
- 检查Chrome安装命令是否正确
|
||||||
|
|
||||||
|
### 常见问题2: 依赖安装失败
|
||||||
|
- 检查 `requirements.txt` 文件格式
|
||||||
|
- 确保Python版本兼容(推荐3.9)
|
||||||
|
|
||||||
|
### 常见问题3: 账号配置错误
|
||||||
|
- 检查JSON格式是否正确
|
||||||
|
- 确保账号密码没有特殊字符
|
||||||
|
- 验证账号是否有效
|
||||||
|
|
||||||
|
### 常见问题4: 执行超时
|
||||||
|
- GitHub Actions有6小时执行时间限制
|
||||||
|
- 如果账号较多,可能需要分批处理
|
||||||
|
|
||||||
|
## 安全建议
|
||||||
|
|
||||||
|
1. **使用Private仓库**:保护你的账号信息
|
||||||
|
2. **定期更换密码**:提高账号安全性
|
||||||
|
3. **监控执行日志**:及时发现异常情况
|
||||||
|
4. **备份重要数据**:定期备份账号配置
|
||||||
|
|
||||||
|
## 监控和维护
|
||||||
|
|
||||||
|
1. **查看执行状态**:每天检查Actions页面
|
||||||
|
2. **分析日志**:下载Artifact查看详细日志
|
||||||
|
3. **更新配置**:根据需要调整账号信息
|
||||||
|
4. **处理错误**:根据错误信息进行相应修复
|
||||||
|
|
||||||
|
## 高级配置
|
||||||
|
|
||||||
|
### 自定义执行时间
|
||||||
|
编辑 `.github/workflows/daily-checkin.yml` 文件中的cron表达式:
|
||||||
|
```yaml
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * *' # 每天UTC 2:00
|
||||||
|
- cron: '0 14 * * *' # 每天UTC 14:00(北京时间22:00)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 多环境部署
|
||||||
|
可以创建多个工作流文件,针对不同环境:
|
||||||
|
- `daily-checkin-prod.yml` - 生产环境
|
||||||
|
- `daily-checkin-test.yml` - 测试环境
|
||||||
|
|
||||||
|
### 通知配置
|
||||||
|
可以添加邮件或Slack通知,在任务完成或失败时发送通知。
|
||||||
|
|
||||||
|
## 技术支持
|
||||||
|
|
||||||
|
如果遇到问题:
|
||||||
|
1. 查看GitHub Actions执行日志
|
||||||
|
2. 检查工作流配置文件语法
|
||||||
|
3. 验证账号配置格式
|
||||||
|
4. 参考GitHub Actions官方文档
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**注意**:本脚本仅供学习和个人使用,请遵守Bing Rewards的服务条款。
|
||||||
113
README.md
113
README.md
@@ -1,2 +1,111 @@
|
|||||||
# bing-auto-rewards
|
# Bing 自动签到脚本
|
||||||
bing自动签到获取积分
|
|
||||||
|
这是一个自动化的Bing Rewards签到脚本,支持多账号并行处理,可以自动完成登录、签到、点击任务和搜索赚积分等操作。
|
||||||
|
|
||||||
|
## 功能特性
|
||||||
|
|
||||||
|
- 🔐 自动登录多个Bing账号
|
||||||
|
- ✅ 自动签到获取积分
|
||||||
|
- 🎯 自动点击积分任务卡片
|
||||||
|
- 🔍 自动搜索赚取积分
|
||||||
|
- 🌐 支持无头模式运行
|
||||||
|
- 📱 多账号组并行处理
|
||||||
|
- 🚀 支持GitHub Actions自动执行
|
||||||
|
|
||||||
|
## 部署方式
|
||||||
|
|
||||||
|
### 方式1: GitHub Actions(推荐)
|
||||||
|
|
||||||
|
1. **Fork本仓库**到你的GitHub账户
|
||||||
|
|
||||||
|
2. **设置GitHub Secrets**:
|
||||||
|
- 进入你的仓库 → Settings → Secrets and variables → Actions
|
||||||
|
- 添加新的secret,名称为`ACCOUNTS_CONFIG`
|
||||||
|
- 值为你的账号配置JSON内容(见下方格式)
|
||||||
|
|
||||||
|
3. **账号配置格式**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"group1": [
|
||||||
|
{
|
||||||
|
"email": "your_email@example.com",
|
||||||
|
"password": "your_password"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group2": [
|
||||||
|
{
|
||||||
|
"email": "another_email@example.com",
|
||||||
|
"password": "another_password"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **自动执行**:
|
||||||
|
- 脚本会在每天UTC时间2:00(北京时间10:00)自动执行
|
||||||
|
- 也可以手动触发:Actions → Bing Daily Check-in → Run workflow
|
||||||
|
|
||||||
|
### 方式2: 本地运行
|
||||||
|
|
||||||
|
1. **安装依赖**:
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **配置账号**:
|
||||||
|
- 编辑`accounts.json`文件,添加你的账号信息
|
||||||
|
|
||||||
|
3. **运行脚本**:
|
||||||
|
```bash
|
||||||
|
# 执行一次
|
||||||
|
python bingZDH.py
|
||||||
|
|
||||||
|
# 或指定参数
|
||||||
|
python bingZDH.py --once # 执行一次
|
||||||
|
python bingZDH.py --auto # 每天凌晨2点自动执行
|
||||||
|
```
|
||||||
|
|
||||||
|
## 注意事项
|
||||||
|
|
||||||
|
⚠️ **重要提醒**:
|
||||||
|
- 请确保你的账号信息安全,不要在公开代码中暴露密码
|
||||||
|
- 建议使用GitHub Secrets存储敏感信息
|
||||||
|
- 脚本使用无头模式运行,适合服务器环境
|
||||||
|
- 支持多账号组并行处理,提高执行效率
|
||||||
|
|
||||||
|
## 日志和监控
|
||||||
|
|
||||||
|
- 执行日志会保存在`bing_automation.log`文件中
|
||||||
|
- 在GitHub Actions中,日志会作为Artifact上传,保留7天
|
||||||
|
- 如果出现错误,会生成截图文件用于调试
|
||||||
|
|
||||||
|
## 故障排除
|
||||||
|
|
||||||
|
### 常见问题
|
||||||
|
|
||||||
|
1. **Chrome启动失败**:
|
||||||
|
- 确保系统已安装Chrome浏览器
|
||||||
|
- 检查网络连接是否正常
|
||||||
|
|
||||||
|
2. **登录失败**:
|
||||||
|
- 检查账号密码是否正确
|
||||||
|
- 确认账号没有被锁定或需要验证
|
||||||
|
|
||||||
|
3. **搜索任务失败**:
|
||||||
|
- 检查网络连接
|
||||||
|
- 确认Bing服务是否正常
|
||||||
|
|
||||||
|
### 获取帮助
|
||||||
|
|
||||||
|
如果遇到问题,请检查:
|
||||||
|
1. 执行日志中的错误信息
|
||||||
|
2. 生成的截图文件
|
||||||
|
3. GitHub Actions的执行记录
|
||||||
|
|
||||||
|
## 许可证
|
||||||
|
|
||||||
|
本项目仅供学习和个人使用,请遵守相关服务条款。
|
||||||
|
|
||||||
|
## 贡献
|
||||||
|
|
||||||
|
欢迎提交Issue和Pull Request来改进这个项目!
|
||||||
|
|||||||
38
accounts.json
Normal file
38
accounts.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"group1": [
|
||||||
|
{
|
||||||
|
"email": "1269738129@qq.com",
|
||||||
|
"password": "zhoulixiang599."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group2": [
|
||||||
|
{
|
||||||
|
"email": "599711766@qq.com",
|
||||||
|
"password": "zhoulixiang599."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group3": [
|
||||||
|
{
|
||||||
|
"email": "z1269738129@2925.com",
|
||||||
|
"password": "zhoulixiang599."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group4": [
|
||||||
|
{
|
||||||
|
"email": "zlx599711@126.com",
|
||||||
|
"password": "zhoulixiang599."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group5": [
|
||||||
|
{
|
||||||
|
"email": "z599711766@2925.com",
|
||||||
|
"password": "zlx1010..."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"group6": [
|
||||||
|
{
|
||||||
|
"email": "idealzhou@outlook.com",
|
||||||
|
"password": "zlx1010..."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
1072
bingZDH.py
Normal file
1072
bingZDH.py
Normal file
File diff suppressed because it is too large
Load Diff
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
selenium==4.15.2
|
||||||
|
undetected-chromedriver==3.5.4
|
||||||
|
requests==2.31.0
|
||||||
|
beautifulsoup4==4.12.2
|
||||||
Reference in New Issue
Block a user