mirror of
https://github.com/cqwu-ehall/cqwu-ehall.git
synced 2024-11-21 18:38:18 +00:00
🐛 Fix login error
Co-authored-by: brian <brian@xtaolabs.com>
This commit is contained in:
parent
60c32861ea
commit
99a9e627df
@ -1,2 +1,2 @@
|
|||||||
from . import types, enums
|
from . import types, enums, errors
|
||||||
from .client import Client
|
from .client import Client
|
||||||
|
2
cqwu/errors/__init__.py
Normal file
2
cqwu/errors/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from .auth import *
|
||||||
|
from .base import *
|
@ -37,7 +37,9 @@ class LoginWithPassword:
|
|||||||
}
|
}
|
||||||
# 是否需要验证码
|
# 是否需要验证码
|
||||||
if not captcha_code:
|
if not captcha_code:
|
||||||
form_data['captchaResponse'] = await self.check_captcha(show_qrcode=show_qrcode)
|
captcha_code = await self.check_captcha(show_qrcode=show_qrcode)
|
||||||
|
if captcha_code:
|
||||||
|
form_data['captchaResponse'] = captcha_code
|
||||||
# 登录
|
# 登录
|
||||||
headers = {
|
headers = {
|
||||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
httpx==0.23.3
|
httpx==0.23.3
|
||||||
lxml==4.9.1
|
lxml==4.9.2
|
||||||
PyExecJS2==1.6.1
|
PyExecJS2==1.6.1
|
||||||
beautifulsoup4==4.11.2
|
beautifulsoup4==4.11.2
|
||||||
qrcode==7.4.2
|
qrcode==7.4.2
|
||||||
|
31
setup.py
Normal file
31
setup.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import setuptools # 导入setuptools打包工具
|
||||||
|
|
||||||
|
with open("README.md", "r", encoding="utf-8") as fh:
|
||||||
|
long_description = fh.read()
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name="cqwu", # 用自己的名替换其中的YOUR_USERNAME_
|
||||||
|
version="0.0.2", # 包版本号,便于维护版本
|
||||||
|
author="omg-xtao", # 作者,可以写自己的姓名
|
||||||
|
author_email="xtao@xtaolink.cn", # 作者联系方式,可写自己的邮箱地址
|
||||||
|
description="A cqwu ehall client.", # 包的简述
|
||||||
|
long_description=long_description, # 包的详细介绍,一般在README.md文件内
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="https://github.com/cqwu-ehall/cqwu-ehall", # 自己项目地址,比如github的项目地址
|
||||||
|
packages=setuptools.find_packages(),
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
],
|
||||||
|
python_requires='>=3.6', # 对python的最低版本要求
|
||||||
|
install_requires=[
|
||||||
|
"httpx==0.23.3",
|
||||||
|
"lxml==4.9.2",
|
||||||
|
"PyExecJS2==1.6.1",
|
||||||
|
"beautifulsoup4==4.11.2",
|
||||||
|
"qrcode==7.4.2",
|
||||||
|
"pillow",
|
||||||
|
"pydantic==1.10.5",
|
||||||
|
],
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user