Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

url: /passport/web/login返回参数为空, 接口状态码: 302 #320

Closed
@yrong

Description

描述问题

`
/home/ronyang/.pyenv/versions/3.6.4/bin/python /ssd/JetBrains/apps/PyCharm-C/ch-0/192.6262.63/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 42091 --file /ssd/mypython/12306/run.py
pydev debugger: process 3321 is connecting

Connected to pydev debugger (build 192.6262.63)
Using TensorFlow backend.


检查当前版本为: 1.1.105
检查当前python版本为:3.6.4,目前版本只支持3.6以上
12306刷票小助手,最后更新于2019.09.03,请勿作为商业用途,交流群号: 1群:286271084(已满)
2群:649992274(已满)
3群:632501142(已满)
4群: 606340519(已满)
5群: 948526733(已满)
6群: 444101020(未满)
7群: 660689659(未满)

当前配置:
出发站:深圳北
到达站:隆回
乘车日期:2019-10-01
坐席:二等座
是否有票优先提交:True
乘车人:['']
刷新间隔: 随机(1-3S)
僵尸票关小黑屋时长: 5
下单接口: 2
下单模式: 2
预售踩点时间:13:00:00


开启cdn查询
本次待筛选cdn总数为1857, 筛选时间大约为5-10min
cookie获取中
cookie获取完成
需要验证码
下载验证码...
下载验证码成功

Corrupt JPEG data: 16 extraneous bytes before marker 0xd9

WARNING:tensorflow:From /home/ronyang/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
2019-09-07 14:35:10.588215: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3192900000 Hz
2019-09-07 14:35:10.588544: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5972b00 executing computations on platform Host. Devices:
2019-09-07 14:35:10.588566: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): ,
2019-09-07 14:35:10.676165: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
/home/ronyang/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/engine/saving.py:310: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
题目为['锦旗']
WARNING:tensorflow:From /home/ronyang/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:2041: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.

/home/ronyang/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/engine/saving.py:310: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
1 调色板
2 棉棒
3 排风机
4 电子秤
5 锦旗
6 调色板
7 网球拍
8 锦旗
验证码识别坐标为40,149,256,149
40,149,256,149
验证码校验失败
需要验证码
下载验证码...
下载验证码成功
Corrupt JPEG data: 15 extraneous bytes before marker 0xd9
/home/ronyang/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/engine/saving.py:310: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
题目为['老虎']
/home/ronyang/.pyenv/versions/3.6.4/lib/python3.6/site-packages/keras/engine/saving.py:310: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
1 电子秤
2 电线
3 排风机
4 茶盅
5 排风机
6 红酒
7 锦旗
8 老虎
验证码识别坐标为256,149
256,149
验证码通过,开始登录..
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
`

`
def baseLogin(self, user, passwd):
"""
登录过程
:param user:
:param passwd:
:return: 权限校验码
"""
logurl = self.session.urls["login"]

    loginData = OrderedDict()
    loginData["username"] = user,
    loginData["password"] = passwd,
    loginData["appid"] = "otn",
    loginData["answer"] = self.randCode,

    tresult = self.session.httpClint.send(logurl, loginData)
    **_if 'result_code' in tresult and **tresult**["result_code"] == 0:_**
        print(u"登录成功")
        tk = self.auth()
        if "newapptk" in tk and tk["newapptk"]:
            return tk["newapptk"]
        else:
            return False
    elif 'result_message' in tresult and tresult['result_message']:
        messages = tresult['result_message']
        if messages.find(u"密码输入错误") is not -1:
            raise UserPasswordException("{0}".format(messages))
        else:
            print(u"登录失败: {0}".format(messages))
            print(u"尝试重新登陆")
            return False
    else:
        return False

`
in debug mode, error as following

tresult = {dict} <class 'dict'>: {'code': 99999, 'message': '重试次数达到上限'}
 'code' (140346851125936) = {int} 99999
 'message' (140346850742768) = {str} '重试次数达到上限'
 __len__ = {int} 2

重现步骤

步骤一

截图&日志

环境信息

  • ubuntu18
  • python3.6.4
  • 订票小助手版本 1.1.105

额外的备注

  • Add any other context about the problem here.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions