Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions .github/workflows/automate.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -282,4 +285,4 @@ def get_account():
daily_fudan.checkin()
# 再检查一遍
daily_fudan.check()
daily_fudan.close(1)
daily_fudan.close(1)