Coder Social home page Coder Social logo

Comments (12)

dong-zeyu avatar dong-zeyu commented on May 8, 2024 47

if self.is_more_ticket_num is 1:
passengerTicketStrList.append(
'0,' + user_info[0]['passenger_type'] + "," + user_info[0][
"passenger_name"] + "," +
user_info[0]['passenger_id_type_code'] + "," + user_info[0]['passenger_id_no'] + "," +
user_info[0]['mobile_no'] + ',N')
oldPassengerStr.append(
user_info[0]['passenger_name'] + "," + user_info[0]['passenger_id_type_code'] + "," +
user_info[0]['passenger_id_no'] + "," + user_info[0]['passenger_type'] + '_')
else:
for i in xrange(self.is_more_ticket_num):
passengerTicketStrList.append(
'0,' + user_info[i]['passenger_type'] + "," + user_info[i][
"passenger_name"] + "," + user_info[i]['passenger_id_type_code'] + "," + user_info[i][
'passenger_id_no'] + "," + user_info[i]['mobile_no'] + ',N_' + set_type)
oldPassengerStr.append(
user_info[i]['passenger_name'] + "," + user_info[i]['passenger_id_type_code'] + "," +
user_info[i]['passenger_id_no'] + "," + user_info[i]['passenger_type'] + '_')

L79和L89的“passenger_type”字段指明了是学生还是成人,“3”为学生票,“1”为成人票,可以改成

 if self.is_more_ticket_num is 1: 
     passengerTicketStrList.append( 
         '0,' + "1" + "," + user_info[0][ 
             "passenger_name"] + "," + 
         user_info[0]['passenger_id_type_code'] + "," + user_info[0]['passenger_id_no'] + "," + 
         user_info[0]['mobile_no'] + ',N') 
     oldPassengerStr.append( 
         user_info[0]['passenger_name'] + "," + user_info[0]['passenger_id_type_code'] + "," + 
         user_info[0]['passenger_id_no'] + "," + user_info[0]['passenger_type'] + '_') 
 else: 
     for i in xrange(self.is_more_ticket_num): 
         passengerTicketStrList.append( 
             '0,' + "1" + "," + user_info[i][ 
                 "passenger_name"] + "," + user_info[i]['passenger_id_type_code'] + "," + user_info[i][ 
                 'passenger_id_no'] + "," + user_info[i]['mobile_no'] + ',N_' + set_type) 
         oldPassengerStr.append( 
             user_info[i]['passenger_name'] + "," + user_info[i]['passenger_id_type_code'] + "," + 
             user_info[i]['passenger_id_no'] + "," + user_info[i]['passenger_type'] + '_') 

来强制购买成人票

from 12306.

followmejoy avatar followmejoy commented on May 8, 2024 3

添加了两个乘车人,买的车票会是连坐吗?可以选择座位位置吗?

from 12306.

ludashuai avatar ludashuai commented on May 8, 2024 1

也可以,直接买学生票,取票的时候,再去人工取票。可以补票

from 12306.

lss-1138 avatar lss-1138 commented on May 8, 2024 1

请问如果我选了硬卧和硬座,会优先下单硬卧吗?还是随机?其次,请问是预售前几个小时运行这个脚本,一直挂着就行了吗?还是需要在预售开始前几分钟再跑这个脚本?

from 12306.

testerSunshine avatar testerSunshine commented on May 8, 2024

学生信息的不是应该买学生皮票吗?是根据你的联系人信息自动下单
Duplicate of #

from 12306.

ybw2016v avatar ybw2016v commented on May 8, 2024

学生信息的不是应该买学生皮票吗?是根据你的联系人信息自动下单
Duplicate of #

学生票有区间、时间和次数限制,超出范围的取不了票……

from 12306.

testerSunshine avatar testerSunshine commented on May 8, 2024

学生信息的不是应该买学生皮票吗?是根据你的联系人信息自动下单
Duplicate of #

学生票有区间、时间和次数限制,超出范围的取不了票……

目前的能快速解决的办法就是更新一下你的联系人,变成成人

from 12306.

cjsoft avatar cjsoft commented on May 8, 2024

能不能在设置里面加一个字段来强制购买某个票种啊

from 12306.

Xuxiaotuan avatar Xuxiaotuan commented on May 8, 2024

dizzam 兄弟的可以

from 12306.

EXing avatar EXing commented on May 8, 2024

也可以,直接买学生票,取票的时候,再去人工取票。可以补票

别做死,没学生证票都不给你补!!

from 12306.

kongzhongfeima avatar kongzhongfeima commented on May 8, 2024

带有学生信息的乘客无法选择成人票,直接自动下单成为学生票。

老哥 确定带有学生信息的乘客直接自动下单成为学生票吗

from 12306.

chrislee0518 avatar chrislee0518 commented on May 8, 2024

学生想买学生票不需要像楼上所说的修改为3,直接跑程序就行吗

from 12306.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.