diff --git a/.github/workflows/automate.yml b/.github/workflows/automate.yml index 325f9ff..f3a596f 100644 --- a/.github/workflows/automate.yml +++ b/.github/workflows/automate.yml @@ -1,30 +1,30 @@ -name: Go +# name: Go -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - schedule: - - cron: '0 2 * * *' - workflow_dispatch: +# on: +# push: +# branches: [ master ] +# pull_request: +# branches: [ master ] +# schedule: +# - cron: '08/10 * * * *' +# workflow_dispatch: -jobs: +# jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: +# build: +# name: Build +# runs-on: ubuntu-latest +# steps: - - name: Check out code - uses: actions/checkout@v2 +# - name: Check out code +# uses: actions/checkout@v2 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install opencv-python==4.5.4.60 - pip install easyocr pillow numpy - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi +# - name: Install dependencies +# run: | +# python -m pip install --upgrade pip +# pip install opencv-python==4.5.4.60 +# pip install easyocr pillow numpy +# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: run - run: STD_ID='${{ secrets.STD_ID }}' PASSWORD='${{ secrets.PASSWORD }}' python3 main.py +# - name: run +# run: STD_ID='${{ secrets.STD_ID }}' PASSWORD='${{ secrets.PASSWORD }}' python3 main.py diff --git a/main.py b/main.py index 30bb147..341550c 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,8 @@ import numpy from PIL import Image from PIL import ImageEnhance +import requests +from requests.packages import urllib3 from requests import session, post, adapters adapters.DEFAULT_RETRIES = 5 @@ -139,6 +141,7 @@ def check(self): 检查 """ print("◉检测是否已提交") + urllib3.disable_warnings() get_info = self.session.get( 'https://zlapp.fudan.edu.cn/ncov/wap/fudan/get-info') last_info = get_info.json() @@ -282,4 +285,4 @@ def get_account(): daily_fudan.checkin() # 再检查一遍 daily_fudan.check() - daily_fudan.close(1) \ No newline at end of file + daily_fudan.close(1)