zycn0910 / Sign-ZXJY

职校家园(实习备案)打卡-2024.9.1可用
GNU General Public License v3.0
47 stars 24 forks source link

11月5日更新后代码:测试运行成功。 #15

Open MGinger520 opened 1 year ago

MGinger520 commented 1 year ago
本次随机 24 s
打卡:   0%|                                                                  | 0/40 [00:01<?, ?人/s]
Traceback (most recent call last):
  File "C:\Users\14260\Desktop\Py集合\1\Main.py", line 23, in <module>
    info = process.login_and_sign_in(user=user, endday=TDOA.days)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\10\process.py", line 162, in login_and_sign_in
    sign_in_response = sign_in_request(uid, user['address'], user['deviceId'], 0, user['longitude'],
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\10\process.py", line 129, in sign_in_request
    response_text = send_request(url, 'POST', headers, data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\1\process.py", line 82, in send_request
    response = requests.post(url, headers=headers, data=json.dumps(data))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\sessions.py", line 575, in request
    prep = self.prepare_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\sessions.py", line 486, in prepare_request
    p.prepare(
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\models.py", line 369, in prepare
    self.prepare_headers(headers)
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\models.py", line 491, in prepare_headers
    check_header_validity(header)
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\utils.py", line 1040, in check_header_validity
    _validate_header_part(header, value, 1)
  File "C:\Users\14260\Desktop\Py集合\venv\Lib\site-packages\requests\utils.py", line 1056, in _validate_header_part
    raise InvalidHeader(
requests.exceptions.InvalidHeader: Invalid leading whitespace, reserved character(s), or returncharacter(s) in header value: ' vivo|vivo X7|5.1'

进程已结束,退出代码为 1
zycn0910 commented 1 year ago

彻底删除,保留用户数据,重新拉代码

MGinger520 commented 1 year ago

image

一样的结果,

yy158358 commented 1 year ago

我这都可以,你看看有没有残留的文件Screenshot_2023-11-05-13-15-24-244_com.termux.jpg

MGinger520 commented 1 year ago

我的json用户这样的配置是否正确?我把手机型号更换了和抓包一样的格式,你看一下:|

 {
        "enabled": true,
        "adddate": "2023-10-17 20:35:40",
        "enddate": "2024-10-29 20:35:40",
        "name": "1111",
        "phone": "132******51",
        "password": "132 ******51a",
        "deviceId": "vivo|V2025A|4.3",
        "dToken": "7a7040f28957b824a0758c314ea096ab",
        "modify_coordinates": true,
        "address": "河南省*******",
        "longitude": "114.******",
        "latitude": "34.2******",
        "pushmode": "2",
        "project":"老师",
        "pushdata": {
            "Ding": {
                "Secret": null,
                "Token": null
            },
            "PushPlus": {
                "Token": "11613dd**********a6daeab9806f9"
            },
            "Server_Turbo": {
                "Token": null
            },
            "Email": {
                "Send": null,
                "Password": null,
                "Server_Address": null,
                "Smtp_Port": null,
                "Receiver": null
            }
        }
    },
MGinger520 commented 1 year ago

不好意思,我排查了一下,是配置文件的问题,我的某个用户的信息里面多了一个空格,导致的。抱歉了。

我看随机时间是不是有点问题?我这运行之后显示随机时间是24s,结果三个用户不到10秒全部结束?

MGinger520 commented 1 year ago

好吧,我解决了。你注释掉了,哈哈哈!感谢!! time.sleep(float(waittime))