├── JC_CheckIn.py
├── LICENSE
└── README.md
/JC_CheckIn.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import json
3 | import os
4 | requests.packages.urllib3.disable_warnings()
5 | SCKEY = os.environ['SCKEY']
6 | def checkin(email=os.environ['EMAIL'], password=os.environ['PASSWORD'],
7 | base_url=os.environ['BASE_URL']):
8 | email = email.split('@')
9 | email = email[0] + '%40' + email[1]
10 | session = requests.session()
11 | session.get(base_url, verify=False)
12 | login_url = base_url + '/auth/login'
13 | headers = {
14 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) '
15 | 'AppleWebKit/537.36 (KHTML, like Gecko) '
16 | 'Chrome/56.0.2924.87 Safari/537.36',
17 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
18 | }
19 | post_data = 'email=' + email + '&passwd=' + password + '&code='
20 | post_data = post_data.encode()
21 | response = session.post(login_url, post_data, headers=headers, verify=False)
22 | headers = {
23 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) '
24 | 'AppleWebKit/537.36 (KHTML, like Gecko) '
25 | 'Chrome/56.0.2924.87 Safari/537.36',
26 | 'Referer': base_url + '/user'
27 | }
28 | response = session.post(base_url + '/user/checkin', headers=headers,
29 | verify=False)
30 | response = json.loads(response.text)
31 | print(response['msg'])
32 | return response['msg']
33 |
34 |
35 | if SCKEY != '':
36 | sendurl = 'http://www.pushplus.plus/send?token=' + SCKEY + '&title=机场签到&content=' + checkin()
37 | r = requests.get(url=sendurl)
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 fanybo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 青龙面板拉取教程
2 |
3 |
4 |
5 | ## 环境变量
6 |
7 |
8 |
9 | ## 依赖
10 |
11 | requests
12 |
--------------------------------------------------------------------------------