QIN2DIM / epic-awesome-gamer

🍷 Gracefully claim weekly free games and monthly content from Epic Store.
https://echosec.notion.site/Epic-7c74f1e29117420dbac5551e4b031f82?pvs=4
GNU General Public License v3.0
891 stars 369 forks source link

Perf(ONNX): 新秩序 #201

Closed QIN2DIM closed 1 year ago

QIN2DIM commented 1 year ago

源码改动

文档改动

研究

基础设施

QIN2DIM commented 1 year ago

Run with Workflow

  1. 在你的仓库设置中为 workflow 添加读和写权限
  2. 在仓库 secrets/actions 部分添加 secrets,EPIC_EMAIL 以及 EPIC_PASSWORD
  3. 新建 workflow.yaml ,拉取认准厂牌 :fish 拉取测试版镜像,帮助测试
name: Claim epic-games

on:
  workflow_dispatch:
  # push:
  #   branches: [ "main" ]

permissions: write-all

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Execute Container
      run: | 
        ls
        docker run --rm \
          -e EPIC_EMAIL=${{ secrets.EPIC_EMAIL }} \
          -e EPIC_PASSWORD=${{ secrets.EPIC_PASSWORD }} \
          -v ${{ github.workspace }}/user_data_dir/:/home/epic/user_data_dir/ \
          -v ${{ github.workspace }}/logs/:/home/epic/logs/ \
          ech0sec/awesome-epic:fish python3 claim.py
    - name: Setup GIT user
      uses: fregante/setup-git-user@v1

    - name: Cache browser context
      run: |
        git add .
        git commit -m "Automated deployment @ $(date '+%Y-%m-%d %H:%M:%S') Asia/Shanghai" 
        git push -f
QIN2DIM commented 1 year ago

来自 Playwright 业内录制。

处理隐藏在订单中的人机挑战 shape_type = "point"

34590867-f61c-47f9-8acc-fb259fa2cab1.webm

CH3NGYZ commented 1 year ago

现在验证码真是层出不穷,肯定困难重重, 加油! 等待真正实现全自动 :smile:

QIN2DIM commented 1 year ago

我还没来得及合并这部分特性,我本地已经做好了,正在优化流程

CH3NGYZ commented 1 year ago

我还没来得及合并这部分特性,我本地已经做好了,正在优化流程

👌🏻 好滴

QIN2DIM commented 1 year ago

@cyz0105

name: Claim EpicGames from SourceGit

on:
  workflow_dispatch:
  # schedule:
  #   - cron: "10 23 * * 4,5" # 主分支内容还在快速迭代

jobs:
  setup:
    env:
      EPIC_EMAIL: ${{ secrets.EPIC_EMAIL }}
      EPIC_PASSWORD: ${{ secrets.EPIC_PASSWORD }}
      FAKE_HASH: "Automated deployment @ $(date '+%Y-%m-%d %H:%M:%S') Asia/Shanghai"
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: 初始化环境 & 拉取项目
      run: |
        sudo timedatectl set-timezone "Asia/Shanghai"
        git clone https://github.com/QIN2DIM/epic-awesome-gamer.git epic
        cp epic/requirements.txt .
    - uses: actions/setup-python@v4
      with:
        python-version: "3.10"
        cache: 'pip' # caching pip dependencies
    - name: 安装依赖
      run: |
        pip install -r epic/requirements.txt
        playwright install firefox
        playwright install-deps firefox
    - name: 启动项目
      run: |
        if [ -d "user_data_dir" ];then cp -rfp user_data_dir epic/; fi
        echo "{}" > epic/src/config.json
        cd epic/src/ && python3 claim.py
    - name: Setup GIT user
      uses: fregante/setup-git-user@v1
    - name: 缓存身份令牌
      run: |
        if [ -d "epic/user_data_dir" ];then cp -rfp epic/user_data_dir . ; fi
        if [ -d "epic/logs" ];then cp -rfp epic/logs . ; fi
        echo "${{ env.FAKE_HASH }}" > _token
        rm -rf epic
        git add .
        git commit -m "${{ env.FAKE_HASH }}" 
        git push -f   
CH3NGYZ commented 1 year ago

@cyz0105

name: Claim EpicGames from SourceGit

on:
  workflow_dispatch:
  # schedule:
  #   - cron: "10 23 * * 4,5" # 主分支内容还在快速迭代

jobs:
  setup:
    env:
      EPIC_EMAIL: ${{ secrets.EPIC_EMAIL }}
      EPIC_PASSWORD: ${{ secrets.EPIC_PASSWORD }}
      FAKE_HASH: "Automated deployment @ $(date '+%Y-%m-%d %H:%M:%S') Asia/Shanghai"
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: 初始化环境 & 拉取项目
      run: |
        sudo timedatectl set-timezone "Asia/Shanghai"
        git clone https://github.com/QIN2DIM/epic-awesome-gamer.git epic
        cp epic/requirements.txt .
    - uses: actions/setup-python@v4
      with:
        python-version: "3.10"
        cache: 'pip' # caching pip dependencies
    - name: 安装依赖
      run: |
        pip install -r epic/requirements.txt
        playwright install firefox
        playwright install-deps firefox
    - name: 启动项目
      run: |
        if [ -d "user_data_dir" ];then cp -rfp user_data_dir epic/; fi
        echo "{}" > epic/src/config.json
        cd epic/src/ && python3 claim.py
    - name: Setup GIT user
      uses: fregante/setup-git-user@v1
    - name: 缓存身份令牌
      run: |
        if [ -d "epic/user_data_dir" ];then cp -rfp epic/user_data_dir . ; fi
        if [ -d "epic/logs" ];then cp -rfp epic/logs . ; fi
        echo "${{ env.FAKE_HASH }}" > _token
        rm -rf epic
        git add .
        git commit -m "${{ env.FAKE_HASH }}" 
        git push -f   

可以运行了, 不过我已经领了免费游戏, 所以看不到领取效果 2023-09-01 14:39:27 | SUCCESS - Pass claim task- {'reason': 'All free games of the week are in my library'}

QIN2DIM commented 1 year ago

@cyz0105 我已经重新部署了项目文档,不过是用 Notion 写的 :>

CH3NGYZ commented 1 year ago

@cyz0105 我已经重新部署了项目文档,不过是用 Notion 写的 :>

感谢回复! 现在 actions 是否还会因为Github actions的ip污染而无法通过结算页的人机挑战 ? 如果发生不能正常挑战的情况, 本地部署能否解决? 谢谢