跳出下单循环

pull/4/head
wenxianping 2018-01-12 14:42:30 +08:00
parent 6a07fd4739
commit bd5bebac3a
3 changed files with 165 additions and 347 deletions

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="79a86edc-721f-4aad-920d-b595d0348b7f" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tkcode" afterPath="$PROJECT_DIR$/tkcode" />
<list default="true" id="79a86edc-721f-4aad-920d-b595d0348b7f" name="Default" comment="跳出下单循环">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/ticket_config.yaml" afterPath="$PROJECT_DIR$/config/ticket_config.yaml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/init/select_ticket_info.py" afterPath="$PROJECT_DIR$/init/select_ticket_info.py" />
@ -23,11 +22,10 @@
<SUITE FILE_PATH="coverage/12306$select_ticket_info.coverage" NAME="select_ticket_info Coverage Results" MODIFIED="1515251193898" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/yixing/init" />
<SUITE FILE_PATH="coverage/12306$test.coverage" NAME="test Coverage Results" MODIFIED="1495722875742" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/12306login" />
<SUITE FILE_PATH="coverage/12306$12306__3_.coverage" NAME="12306 (3) Coverage Results" MODIFIED="1495984861694" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/yixing" />
<SUITE FILE_PATH="coverage/12306$select_ticket_info__1_.coverage" NAME="select_ticket_info (1) Coverage Results" MODIFIED="1515674706624" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/init" />
<SUITE FILE_PATH="coverage/12306$ticketConf.coverage" NAME="ticketConf Coverage Results" MODIFIED="1515140061195" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/yixing/config" />
<SUITE FILE_PATH="coverage/12306$login.coverage" NAME="login Coverage Results" MODIFIED="1501571219088" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/yixing/init" />
<SUITE FILE_PATH="coverage/12306$tiket.coverage" NAME="tiket Coverage Results" MODIFIED="1495973122962" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/yixing" />
<SUITE FILE_PATH="coverage/12306$run__1_.coverage" NAME="run (1) Coverage Results" MODIFIED="1515722634951" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/12306$run__1_.coverage" NAME="run (1) Coverage Results" MODIFIED="1515735004838" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/12306$haha.coverage" NAME="haha Coverage Results" MODIFIED="1515250987704" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/yixing" />
<SUITE FILE_PATH="coverage/12306$12306.coverage" NAME="12306 Coverage Results" MODIFIED="1495722251078" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
@ -42,8 +40,8 @@
<file leaf-file-name="login.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/init/login.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-130">
<caret line="145" column="38" lean-forward="true" selection-start-line="141" selection-start-column="7" selection-end-line="145" selection-end-column="38" />
<state relative-caret-position="2030">
<caret line="145" column="38" lean-forward="false" selection-start-line="141" selection-start-column="7" selection-end-line="145" selection-end-column="38" />
<folding>
<element signature="e#41#54#0" expanded="true" />
</folding>
@ -54,8 +52,8 @@
<file leaf-file-name="damatuWeb.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/damatuCode/damatuWeb.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1161">
<caret line="21" column="43" lean-forward="false" selection-start-line="21" selection-start-column="43" selection-end-line="21" selection-end-column="43" />
<state relative-caret-position="1596">
<caret line="114" column="27" lean-forward="false" selection-start-line="114" selection-start-column="27" selection-end-line="114" selection-end-column="27" />
<folding>
<element signature="e#24#38#0" expanded="true" />
</folding>
@ -85,29 +83,25 @@
</provider>
</entry>
</file>
<file leaf-file-name="select_ticket_info.py" pinned="false" current-in-tab="true">
<file leaf-file-name="select_ticket_info.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/init/select_ticket_info.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-12">
<caret line="632" column="0" lean-forward="true" selection-start-line="632" selection-start-column="0" selection-end-line="632" selection-end-column="0" />
<state relative-caret-position="214">
<caret line="268" column="8" lean-forward="false" selection-start-line="268" selection-start-column="8" selection-end-line="268" selection-end-column="8" />
<folding>
<element signature="e#23#34#0" expanded="true" />
<marker date="1515739269114" expanded="true" signature="31992:32032" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ticket_config.yaml" pinned="false" current-in-tab="false">
<file leaf-file-name="ticket_config.yaml" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/config/ticket_config.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="440">
<caret line="55" column="25" lean-forward="true" selection-start-line="55" selection-start-column="25" selection-end-line="55" selection-end-column="25" />
<folding>
<marker date="1515731407203" expanded="true" signature="781:786" ph="set: &lt;8 keys&gt;" />
<marker date="1515731407203" expanded="true" signature="1414:1415" ph="wenxianping" />
<marker date="1515731407203" expanded="true" signature="1414:1432" ph="damatu: &lt;2 keys&gt;" />
<marker date="1515731407203" expanded="true" signature="1423:1432" ph="wen1995" />
</folding>
<state relative-caret-position="626">
<caret line="60" column="9" lean-forward="false" selection-start-line="60" selection-start-column="9" selection-end-line="60" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
@ -143,6 +137,8 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>DTO</find>
<find>\u4e0a\u6d77</find>
<find>长沙</find>
<find>_json_att</find>
<find>myurllib2</find>
@ -170,17 +166,14 @@
<find>尝试提交订单...</find>
<find>恭喜您订票成功</find>
<find>checkRandCodeAnsyn</find>
<find>ticketIsExitsException(submitResult['messages'][0])</find>
<find>ticketIsExitsException</find>
<find>该车次小于上次提交时间</find>
<find>initDc</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="UPDATE_TYPE" value="MERGE" />
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="master" />
<entry key="$PROJECT_DIR$" value="c114077926c834ce85e64f9fc2620185dcf196ac" />
</map>
</option>
</component>
@ -217,11 +210,11 @@
<option value="$PROJECT_DIR$/yixing/init/login.py" />
<option value="$PROJECT_DIR$/config/ticketConf.py" />
<option value="$PROJECT_DIR$/myException/ticketNumOutException.py" />
<option value="$PROJECT_DIR$/damatuCode/damatuWeb.py" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/init/login.py" />
<option value="$PROJECT_DIR$/damatuCode/damatuWeb.py" />
<option value="$PROJECT_DIR$/config/ticket_config.yaml" />
<option value="$PROJECT_DIR$/init/select_ticket_info.py" />
<option value="$PROJECT_DIR$/config/ticket_config.yaml" />
</list>
</option>
</component>
@ -311,119 +304,6 @@
<recent name="D:\my_work\12306\12306login" />
</key>
</component>
<component name="RestoreUpdateTree" date="Moments ago" ActionInfo="_Update">
<UpdatedFiles>
<FILE-GROUP>
<option name="myUpdateName" value="Updated from server" />
<option name="myStatusName" value="Changed on server" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="CHANGED_ON_SERVER" />
<FILE-GROUP>
<option name="myUpdateName" value="Updated" />
<option name="myStatusName" value="Changed" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="UPDATED" />
<PATH vcs="Git" revision="">$PROJECT_DIR$/README.md</PATH>
<PATH vcs="Git" revision="">$PROJECT_DIR$/damatuCode/damatuWeb.py</PATH>
<PATH vcs="Git" revision="">$PROJECT_DIR$/init/select_ticket_info.py</PATH>
<PATH vcs="Git" revision="">$PROJECT_DIR$/tkcode</PATH>
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Created" />
<option name="myStatusName" value="Created" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="CREATED" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Deleted" />
<option name="myStatusName" value="Deleted" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="true" />
<option name="myId" value="REMOVED_FROM_REPOSITORY" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Restored" />
<option name="myStatusName" value="Will be restored" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="RESTORED" />
</FILE-GROUP>
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Modified" />
<option name="myStatusName" value="Modified" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="MODIFIED" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Skipped" />
<option name="myStatusName" value="Skipped" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="SKIPPED" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Merged with conflicts" />
<option name="myStatusName" value="Will be merged with conflicts" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="MERGED_WITH_CONFLICTS" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Merged with tree conflicts" />
<option name="myStatusName" value="Merged with tree conflicts" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="MERGED_WITH_TREE_CONFLICT" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Merged with property conflicts" />
<option name="myStatusName" value="Will be merged with property conflicts" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="MERGED_WITH_PROPERTY_CONFLICT" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Merged" />
<option name="myStatusName" value="Will be merged" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="MERGED" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Not in repository" />
<option name="myStatusName" value="Not in repository" />
<option name="mySupportsDeletion" value="true" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="UNKNOWN" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Locally added" />
<option name="myStatusName" value="Locally added" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="LOCALLY_ADDED" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Locally removed" />
<option name="myStatusName" value="Locally removed" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="LOCALLY_REMOVED" />
</FILE-GROUP>
<FILE-GROUP>
<option name="myUpdateName" value="Switched" />
<option name="myStatusName" value="Switched" />
<option name="mySupportsDeletion" value="false" />
<option name="myCanBeAbsent" value="false" />
<option name="myId" value="SWITCHED" />
</FILE-GROUP>
</UpdatedFiles>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
@ -722,24 +602,6 @@
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="select_ticket_info (1)" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/init" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="12306" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/init/select_ticket_info.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="select_ticket_info" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -758,21 +620,39 @@
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="ticketConf" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/yixing/config" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="12306" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/yixing/config/ticketConf.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="Python.12306 (3)" />
<item index="1" class="java.lang.String" itemvalue="Python.run" />
<item index="2" class="java.lang.String" itemvalue="Python.select_ticket_info" />
<item index="3" class="java.lang.String" itemvalue="Python.haha" />
<item index="4" class="java.lang.String" itemvalue="Python.run (1)" />
<item index="5" class="java.lang.String" itemvalue="Python.select_ticket_info (1)" />
<item index="3" class="java.lang.String" itemvalue="Python.ticketConf" />
<item index="4" class="java.lang.String" itemvalue="Python.haha" />
<item index="5" class="java.lang.String" itemvalue="Python.run (1)" />
</list>
<recent_temporary>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="Python.run (1)" />
<item index="1" class="java.lang.String" itemvalue="Python.select_ticket_info (1)" />
<item index="2" class="java.lang.String" itemvalue="Python.run" />
<item index="3" class="java.lang.String" itemvalue="Python.select_ticket_info" />
<item index="4" class="java.lang.String" itemvalue="Python.haha" />
<item index="1" class="java.lang.String" itemvalue="Python.run" />
<item index="2" class="java.lang.String" itemvalue="Python.select_ticket_info" />
<item index="3" class="java.lang.String" itemvalue="Python.haha" />
<item index="4" class="java.lang.String" itemvalue="Python.ticketConf" />
</list>
</recent_temporary>
</component>
@ -934,74 +814,40 @@
<option name="project" value="LOCAL" />
<updated>1515662814175</updated>
</task>
<task id="LOCAL-00022" summary="fix">
<created>1515662876057</created>
<task id="LOCAL-00022" summary="跳出下单循环">
<created>1515736276438</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1515662876057</updated>
<updated>1515736276438</updated>
</task>
<task id="LOCAL-00023" summary="fix">
<created>1515678242134</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1515678242134</updated>
</task>
<task id="LOCAL-00024" summary="限制队列线程买票大小">
<created>1515678353449</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1515678353449</updated>
</task>
<task id="LOCAL-00025" summary="fix">
<created>1515678550387</created>
<option name="number" value="00025" />
<option name="presentableId" value="LOCAL-00025" />
<option name="project" value="LOCAL" />
<updated>1515678550387</updated>
</task>
<option name="localTasksCounter" value="26" />
<option name="localTasksCounter" value="23" />
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5465538" sideWeight="0.50429183" order="11" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.46795648" sideWeight="0.49570817" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="18" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1702432" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17238913" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5465538" sideWeight="0.50429183" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.47922438" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54413545" sideWeight="0.49570817" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.44377267" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.7315599" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5465538" sideWeight="0.50429183" order="14" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54413545" sideWeight="0.49570817" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="15" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.48004836" sideWeight="0.5" order="16" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="17" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1702432" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32889965" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.7315599" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@ -1071,18 +917,17 @@
<MESSAGE value="优化订购车票流程" />
<MESSAGE value="1、12306接口无响应的时候给出合理提示&#10;2、优化订票排队时间" />
<MESSAGE value="更改冗余目录结构" />
<MESSAGE value="fix" />
<MESSAGE value="更改车次提示不间断" />
<MESSAGE value="修改提交需要验证码逻辑" />
<MESSAGE value="提交验证码拉去类别问题" />
<MESSAGE value="增加提交订单验证码校验" />
<MESSAGE value="跳出下单循环" />
<MESSAGE value="限制队列线程买票大小" />
<MESSAGE value="fix" />
<option name="LAST_COMMIT_MESSAGE" value="fix" />
<option name="LAST_COMMIT_MESSAGE" value="跳出下单循环" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="21" />
<option name="time" value="18" />
</breakpoint-manager>
<watches-manager />
</component>
@ -1192,14 +1037,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/run.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="6" column="33" lean-forward="false" selection-start-line="6" selection-start-column="33" selection-end-line="6" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="28">
@ -1208,14 +1045,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/myException/ticketNumOutException.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="27" lean-forward="false" selection-start-line="0" selection-start-column="27" selection-end-line="0" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="117">
@ -1224,6 +1053,34 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/init/login.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2030">
<caret line="145" column="38" lean-forward="false" selection-start-line="141" selection-start-column="7" selection-end-line="145" selection-end-column="38" />
<folding>
<element signature="e#41#54#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/damatuCode/damatuWeb.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1596">
<caret line="114" column="27" lean-forward="false" selection-start-line="114" selection-start-column="27" selection-end-line="114" selection-end-column="27" />
<folding>
<element signature="e#24#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/run.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="6" column="33" lean-forward="false" selection-start-line="6" selection-start-column="33" selection-end-line="6" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/ticketConf.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="168">
@ -1234,6 +1091,14 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/myException/ticketNumOutException.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="27" lean-forward="false" selection-start-line="0" selection-start-column="27" selection-end-line="0" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="70">
@ -1242,48 +1107,24 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/ticket_config.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="440">
<caret line="55" column="25" lean-forward="true" selection-start-line="55" selection-start-column="25" selection-end-line="55" selection-end-column="25" />
<folding>
<marker date="1515731407203" expanded="true" signature="781:786" ph="set: &lt;8 keys&gt;" />
<marker date="1515731407203" expanded="true" signature="1414:1415" ph="wenxianping" />
<marker date="1515731407203" expanded="true" signature="1414:1432" ph="damatu: &lt;2 keys&gt;" />
<marker date="1515731407203" expanded="true" signature="1423:1432" ph="wen1995" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/damatuCode/damatuWeb.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1161">
<caret line="21" column="43" lean-forward="false" selection-start-line="21" selection-start-column="43" selection-end-line="21" selection-end-column="43" />
<folding>
<element signature="e#24#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/init/login.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-130">
<caret line="145" column="38" lean-forward="true" selection-start-line="141" selection-start-column="7" selection-end-line="145" selection-end-column="38" />
<folding>
<element signature="e#41#54#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/init/select_ticket_info.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-12">
<caret line="632" column="0" lean-forward="true" selection-start-line="632" selection-start-column="0" selection-end-line="632" selection-end-column="0" />
<state relative-caret-position="214">
<caret line="268" column="8" lean-forward="false" selection-start-line="268" selection-start-column="8" selection-end-line="268" selection-end-column="8" />
<folding>
<element signature="e#23#34#0" expanded="true" />
<marker date="1515739269114" expanded="true" signature="31992:32032" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/ticket_config.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="626">
<caret line="60" column="9" lean-forward="false" selection-start-line="60" selection-start-column="9" selection-end-line="60" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -46,9 +46,9 @@ set:
- "彭淑杰"
- "金宏博"
12306count:
# - uesr: "13828728396"
# - uesr: ""
# - pwd: "649823049lilymin"
- uesr: "931128603@qq.com"
- uesr: "@qq.com"
- pwd: "QWERTY"
select_refresh_interval: 0.1
@ -58,7 +58,7 @@ is_aotu_code: False
#enable_proxy: False
damatu:
uesr: "wenxianping"
uesr: ""
pwd: "wen1995"

View File

@ -7,7 +7,6 @@ import threading
import urllib
import sys
import time
import Queue
from collections import OrderedDict
from config.ticketConf import _get_yaml
@ -33,8 +32,6 @@ class select:
self.user_info = ""
self.secretStr = ""
self.ticket_black_list = dict()
self.submitQueue = Queue.Queue(5)
self.ticket_skip_time = dict()
def get_ticket_info(self):
"""
@ -53,7 +50,7 @@ class select:
expect_refresh_interval = ticket_info_config["expect_refresh_interval"]
ticket_black_list_time = ticket_info_config["ticket_black_list_time"]
print "*"*20
print "当前配置:出发站:{0}\n到达站:{1}\n乘车日期:{2}\n坐席:{3}\n是否有票自动提交:{4}\n乘车人:{5}\n刷新间隔:{6}\n候选购买车次:{7}\n未开始刷票间隔时间:{8}\n僵尸票关小黑屋时长:{9}".format\
print "当前配置:出发站:{0}\n到达站:{1}\n乘车日期:{2}\n坐席:{3}\n是否有票自动提交:{4}\n乘车人:{5}\n刷新间隔:{6}\n候选购买车次:{7}\n未开始刷票间隔时间:{8}\n僵尸票关小黑屋时长:{9}\n".format\
(
from_station,
to_station,
@ -234,13 +231,15 @@ class select:
if self.ticket_black_list.has_key(train_no) and (datetime.datetime.now() - self.ticket_black_list[train_no]).seconds/60 < int(self.ticket_black_list_time):
print("该车次{} 正在被关小黑屋,跳过此车次".format(train_no))
break
if self.ticket_skip_time.has_key(train_no) and (datetime.datetime.now() - self.ticket_skip_time[train_no]).seconds < 10:
# 判断离上次车次订票时间,如果间隔太小,则跳过,如果想不停地疯狂提交那请设置99999就无等待了
break
else:
self.submitQueue.put({"obj": self, "train_no": train_no, "seat": self._station_seat[j].encode("utf8")})
print ('正在尝试提交订票...')
self.ticket_skip_time[train_no] = datetime.datetime.now()
if self.check_user():
self.submit_station()
self.getPassengerTicketStr(self._station_seat[j].encode("utf8"))
self.getRepeatSubmitToken()
self.user_info = self.getPassengerDTOs()
if self.checkOrderInfo(train_no, self._station_seat[j].encode("utf8")):
break
else:
pass
else:
@ -381,6 +380,7 @@ class select:
else:
if "errMsg" in checkOrderInfo['data'] and checkOrderInfo['data']["errMsg"]:
print checkOrderInfo['data']["errMsg"]
else:
print checkOrderInfo
elif 'messages' in checkOrderInfo and checkOrderInfo['messages']:
@ -448,6 +448,7 @@ class select:
模拟提交订单是确认按钮参数获取方法还是get_ticketInfoForPassengerForm 中获取
:return:
"""
passengerTicketStrList, oldPassengerStr = self.getPassengerTicketStrListAndOldPassengerStr()
checkQueueOrderUrl = "https://kyfw.12306.cn/otn/confirmPassenger/confirmSingleForQueue"
data = {
@ -546,7 +547,7 @@ class select:
elif "messages" in queryOrderWaitTimeResult and queryOrderWaitTimeResult["messages"]:
print("排队等待失败: " + queryOrderWaitTimeResult["messages"])
else:
print("{}排队中,请耐心等待".format(num))
print("{}排队中,请耐心等待".format(num))
else:
print("排队中")
time.sleep(2)
@ -609,82 +610,58 @@ class select:
def main(self):
from_station, to_station = self.station_table(self.from_station, self.to_station)
if self.leftTicketLog(from_station, to_station):
submitOrderConsumer("daemon1", self.submitQueue).start()
num = 1
runedTime = 0
while 1:
num += 1
sleepTime = self.select_refresh_interval*1000-runedTime
if sleepTime > 0:
time.sleep(sleepTime/1000.0)
if time.strftime('%H:%M:%S', time.localtime(time.time())) > "23:00:00":
print "12306休息时间本程序自动停止,明天早上七点运行"
break
start_time = datetime.datetime.now()
try:
num += 1
time.sleep(self.select_refresh_interval)
if time.strftime('%H:%M:%S', time.localtime(time.time())) > "23:00:00":
print "12306休息时间本程序自动停止,明天早上七点运行"
break
start_time = datetime.datetime.now()
self.submitOrderRequest(from_station, to_station)
print "正在第{0}次查询 乘车日期: {1} 车次{2} 查询无票 代理设置 无 总耗时{3}ms".format(num, self.station_date, ",".join(self.station_trains), (datetime.datetime.now()-start_time).microseconds/1000)
except PassengerUserException as e:
print e.message
break
except ticketConfigException as e:
print e.message
break
except ticketIsExitsException as e:
print e.message
break
except ticketNumOutException as e:
print e.message
break
except ValueError as e:
if e.message == "No JSON object could be decoded":
print("12306接口无响应正在重试")
else:
print(e.message)
runedTime = (datetime.datetime.now()-start_time).microseconds/1000
print "正在第{0}次查询 乘车日期: {1} 车次{2} 查询无票 代理设置 无 总耗时{3}ms".format(num, self.station_date, ",".join(self.station_trains), runedTime)
except KeyError as e:
print(e.message)
class selectProducer(threading.Thread):
"""刷票队列"""
def __init__(self, t_name, data):
self.t_name = t_name
self.data = data
threading.Thread.__init__(self, name=self.t_name)
print "{0} 正在运行".format(self.t_name)
def run(self):
self.worker(self.data)
def worker(self, data):
obj = data['obj']
try:
if obj.check_user():
obj.submit_station()
obj.getPassengerTicketStr(data['seat'])
obj.getRepeatSubmitToken()
obj.user_info = obj.getPassengerDTOs()
if obj.checkOrderInfo(data['train_no'], data['seat']):
return
obj.submitQueue.task_done()
except PassengerUserException as e:
print e.message
except ticketConfigException as e:
print e.message
except ticketIsExitsException as e:
print e.message
except ticketNumOutException as e:
print e.message
except ValueError as e:
if e.message == "No JSON object could be decoded":
print("12306接口无响应正在重试")
else:
print(e.message)
print("{0} 线程运行结束".format(self.t_name))
class submitOrderConsumer(threading.Thread):
"""订单队列"""
def __init__(self, t_name, queue):
threading.Thread.__init__(self, name=t_name)
self.data = queue
print "{0} 正在运行".format(t_name)
def run(self):
while 1:
if not self.data.empty():
taskData = self.data.get()
selectProducer(taskData['train_no']+str(random.random()), taskData).start()
else:
time.sleep(1.5)
# class selectProducer(threading.Thread):
# """刷票队列"""
# def __init__(self, t_name, queue):
# threading.Thread.__init__(self, name=t_name)
# self.data = queue
# print "{0} 正在运行".format(t_name)
#
# def run(self):
# pass
#
#
# class submitOrderConsumer(threading.Thread):
# """订单队列"""
# def __init__(self, t_name, queue):
# threading.Thread.__init__(self, name=t_name)
# self.data = queue
# print "{0} 正在运行".format(t_name)
#
# def run(self):
# pass
if __name__ == '__main__':