Your Name 6 éve
szülő
commit
f6ebda38b4

+ 169 - 189
hg3535/.idea/workspace.xml

@@ -2,14 +2,15 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="7fa42e97-ddea-4404-91db-5a9ccc162649" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/pipeline/saiguo.py" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/spiders/saiguo.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/items.py" beforeDir="false" afterPath="$PROJECT_DIR$/items.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pipeline/roll_bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_bangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/lanqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/roll_lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_lanqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/roll_wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_wangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/roll_zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_zuqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/wangqiu.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/pipeline/zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/zuqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/settings.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/spiders/roll_lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_lanqiu.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -19,7 +20,7 @@
   </component>
   <component name="CoverageDataManager">
     <SUITE FILE_PATH="coverage/hg3535$items.coverage" NAME="items Coverage Results" MODIFIED="1554291398794" 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/hg3535$main.coverage" NAME="main Coverage Results" MODIFIED="1567407610967" 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/hg3535$main.coverage" NAME="main Coverage Results" MODIFIED="1567410979859" 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/hg3535$hgjieshu.coverage" NAME="hgjieshu Coverage Results" MODIFIED="1558494720094" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/spiders" />
     <SUITE FILE_PATH="coverage/hg3535$halffull.coverage" NAME="halffull Coverage Results" MODIFIED="1554544334424" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/spiders" />
     <SUITE FILE_PATH="coverage/hg3535$pipelines.coverage" NAME="pipelines Coverage Results" MODIFIED="1554290866137" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
@@ -50,8 +51,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/main.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="160">
-              <caret line="8" column="37" lean-forward="true" selection-start-line="8" selection-start-column="37" selection-end-line="8" selection-end-column="37" />
+            <state relative-caret-position="300">
+              <caret line="15" column="50" lean-forward="true" selection-start-line="15" selection-start-column="50" selection-end-line="15" selection-end-column="50" />
               <folding>
                 <element signature="e#0#10#0" expanded="true" />
               </folding>
@@ -59,44 +60,11 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="112">
-              <caret line="26" column="34" lean-forward="true" selection-start-line="26" selection-start-column="34" selection-end-line="26" selection-end-column="34" />
-              <folding>
-                <element signature="e#0#15#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="940">
-              <caret line="47" column="19" lean-forward="true" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="19" />
-              <folding>
-                <element signature="e#18#33#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/middlewares.py">
+        <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="799">
-              <caret line="152" selection-start-line="152" selection-end-line="152" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="396">
-              <caret line="22" column="4" selection-start-line="22" selection-start-column="4" selection-end-line="22" selection-end-column="4" />
+            <state relative-caret-position="80">
+              <caret line="229" column="52" lean-forward="true" selection-start-line="229" selection-start-column="52" selection-end-line="229" selection-end-column="52" />
               <folding>
                 <element signature="e#0#15#0" expanded="true" />
               </folding>
@@ -104,63 +72,30 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/helper.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="200">
-              <caret line="13" selection-start-line="13" selection-end-line="13" />
-              <folding>
-                <element signature="e#0#14#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-5140">
-              <caret line="40" column="21" lean-forward="true" selection-start-line="40" selection-start-column="14" selection-end-line="40" selection-end-column="70" />
-              <folding>
-                <element signature="e#24#35#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="302">
-              <caret line="56" column="39" lean-forward="true" selection-start-line="55" selection-end-line="59" selection-end-column="96" />
+            <state relative-caret-position="-774">
+              <caret line="209" column="59" lean-forward="true" selection-start-line="209" selection-start-column="59" selection-end-line="209" selection-end-column="59" />
               <folding>
-                <element signature="e#24#35#0" expanded="true" />
+                <element signature="e#0#15#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="295">
-              <caret line="97" column="31" selection-start-line="97" selection-start-column="31" selection-end-line="97" selection-end-column="31" />
+            <state relative-caret-position="340">
+              <caret line="17" column="43" selection-start-line="17" selection-start-column="43" selection-end-line="17" selection-end-column="43" />
               <folding>
-                <element signature="e#18#33#0" expanded="true" />
+                <element signature="e#0#15#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/settings.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="160">
-              <caret line="152" column="49" selection-start-line="152" selection-start-column="49" selection-end-line="152" selection-end-column="49" />
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -172,8 +107,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>total_goals</find>
-      <find>2or7</find>
       <find>st_zq_league</find>
       <find>zqtwo_intodb</find>
       <find>odds_only</find>
@@ -202,12 +135,15 @@
       <find>response_data</find>
       <find>Roll_Wangqiu</find>
       <find>Roll_Lanqiu</find>
+      <find>score_home</find>
+      <find>fuhao</find>
     </findStrings>
     <replaceStrings>
       <replace>&quot;&quot;</replace>
       <replace>session</replace>
       <replace>棒球</replace>
       <replace>res</replace>
+      <replace>result</replace>
     </replaceStrings>
   </component>
   <component name="Git.Settings">
@@ -292,20 +228,20 @@
         <option value="$PROJECT_DIR$/pipeline/ball_func.py" />
         <option value="$PROJECT_DIR$/spiders/roll_wangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_zuqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_wangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/wangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/lanqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_lanqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/bangqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/roll_bangqiu.py" />
         <option value="$PROJECT_DIR$/items.py" />
-        <option value="$PROJECT_DIR$/pipeline/saiguo.py" />
         <option value="$PROJECT_DIR$/settings.py" />
+        <option value="$PROJECT_DIR$/pipeline/saiguo.py" />
+        <option value="$PROJECT_DIR$/spiders/saiguo.py" />
         <option value="$PROJECT_DIR$/main.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_lanqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/zuqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/saiguo.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/lanqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/wangqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_wangqiu.py" />
       </list>
     </option>
   </component>
@@ -616,7 +552,7 @@
       <workItem from="1566976369645" duration="4000" />
       <workItem from="1566976385269" duration="13184000" />
       <workItem from="1566990066292" duration="35762000" />
-      <workItem from="1567126891838" duration="75798000" />
+      <workItem from="1567126891838" duration="80239000" />
     </task>
     <task id="LOCAL-00001" summary="修改后,版本二">
       <created>1555727493584</created>
@@ -877,11 +813,25 @@
       <option name="project" value="LOCAL" />
       <updated>1567246291969</updated>
     </task>
-    <option name="localTasksCounter" value="38" />
+    <task id="LOCAL-00038" summary="updata">
+      <created>1567407670828</created>
+      <option name="number" value="00038" />
+      <option name="presentableId" value="LOCAL-00038" />
+      <option name="project" value="LOCAL" />
+      <updated>1567407670828</updated>
+    </task>
+    <task id="LOCAL-00039" summary="updata">
+      <created>1567409111390</created>
+      <option name="number" value="00039" />
+      <option name="presentableId" value="LOCAL-00039" />
+      <option name="project" value="LOCAL" />
+      <updated>1567409111390</updated>
+    </task>
+    <option name="localTasksCounter" value="40" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="1754472000" />
+    <option name="totallyTimeSpent" value="1758913000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -894,13 +844,14 @@
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
+    <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.1705757" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.1705757" />
       <window_info id="Structure" order="1" sideWeight="0.2882615" side_tool="true" weight="0.1108742" />
       <window_info id="Favorites" order="2" sideWeight="0.5013405" side_tool="true" weight="0.108208954" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" weight="0.32832617" />
-      <window_info anchor="bottom" id="Debug" order="2" sideWeight="0.49946696" weight="0.36802575" />
+      <window_info anchor="bottom" id="Debug" order="2" sideWeight="0.49946696" weight="0.2414163" />
       <window_info anchor="bottom" id="Cvs" order="3" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="4" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="5" weight="0.32832617" />
@@ -910,7 +861,7 @@
       <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50692964" side_tool="true" weight="0.38519314" />
       <window_info anchor="bottom" x="22" y="376" width="1876" height="298" id="Terminal" order="10" sideWeight="0.49307036" weight="0.3530043" />
       <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.4356223" />
-      <window_info active="true" anchor="bottom" id="Run" order="12" sideWeight="0.87473345" visible="true" weight="0.6351931" />
+      <window_info anchor="bottom" id="Run" order="12" sideWeight="0.87473345" visible="true" weight="0.27360514" />
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -1104,6 +1055,41 @@
           <line>366</line>
           <option name="timeStamp" value="74" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/spiders/saiguo.py</url>
+          <line>86</line>
+          <option name="timeStamp" value="100" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/spiders/saiguo.py</url>
+          <line>89</line>
+          <option name="timeStamp" value="102" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/spiders/saiguo.py</url>
+          <line>84</line>
+          <option name="timeStamp" value="104" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>297</line>
+          <option name="timeStamp" value="105" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>299</line>
+          <option name="timeStamp" value="106" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>41</line>
+          <option name="timeStamp" value="107" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>43</line>
+          <option name="timeStamp" value="108" />
+        </line-breakpoint>
       </breakpoints>
       <default-breakpoints>
         <breakpoint type="python-exception">
@@ -1313,23 +1299,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-160">
-          <caret line="14" column="20" selection-start-line="14" selection-start-column="20" selection-end-line="14" selection-end-column="20" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-12017">
-          <caret line="89" column="20" lean-forward="true" selection-start-line="89" selection-start-column="20" selection-end-line="89" selection-end-column="20" />
-          <folding>
-            <element signature="e#24#39#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/pipeline/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="277">
@@ -1350,26 +1319,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="897">
-          <caret line="295" column="16" lean-forward="true" selection-start-line="295" selection-start-column="16" selection-end-line="295" selection-end-column="16" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="243">
-          <caret line="150" column="43" lean-forward="true" selection-start-line="150" selection-start-column="43" selection-end-line="150" selection-end-column="43" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="8600">
@@ -1390,126 +1339,157 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/items.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="280">
-          <caret line="14" selection-start-line="14" selection-end-line="17" selection-end-column="34" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="356">
+          <caret line="458" lean-forward="true" selection-start-line="458" selection-end-line="458" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/items.py">
+    <entry file="file://$PROJECT_DIR$/spiders/liansai.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="356">
-          <caret line="458" lean-forward="true" selection-start-line="458" selection-end-line="458" />
+        <state relative-caret-position="-420" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/middlewares.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="799">
+          <caret line="152" selection-start-line="152" selection-end-line="152" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2717">
-          <caret line="157" column="17" lean-forward="true" selection-start-line="157" selection-start-column="17" selection-end-line="157" selection-end-column="17" />
+        <state relative-caret-position="860">
+          <caret line="53" column="72" selection-start-line="53" selection-start-column="72" selection-end-line="53" selection-end-column="72" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#18#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/liansai.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-420" />
+        <state relative-caret-position="20">
+          <caret line="14" column="20" selection-start-line="14" selection-start-column="20" selection-end-line="14" selection-end-column="20" />
+        </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="295">
-          <caret line="97" column="31" selection-start-line="97" selection-start-column="31" selection-end-line="97" selection-end-column="31" />
-          <folding>
-            <element signature="e#18#33#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="-2914">
+          <caret line="8" column="25" selection-start-line="8" selection-start-column="25" selection-end-line="8" selection-end-column="25" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/helper.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="200">
-          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        <state relative-caret-position="-8993">
+          <caret line="40" column="21" lean-forward="true" selection-start-line="40" selection-start-column="14" selection-end-line="40" selection-end-column="70" />
           <folding>
-            <element signature="e#0#14#0" expanded="true" />
+            <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/middlewares.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="799">
-          <caret line="152" selection-start-line="152" selection-end-line="152" />
+        <state relative-caret-position="11580">
+          <caret line="645" column="59" lean-forward="true" selection-start-line="645" selection-start-column="59" selection-end-line="645" selection-end-column="59" />
+          <folding>
+            <element signature="e#24#39#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/settings.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="160">
-          <caret line="152" column="49" selection-start-line="152" selection-start-column="49" selection-end-line="152" selection-end-column="49" />
+        <state relative-caret-position="679">
+          <caret line="150" column="50" lean-forward="true" selection-start-line="150" selection-start-column="50" selection-end-line="150" selection-end-column="50" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-5140">
-          <caret line="40" column="21" lean-forward="true" selection-start-line="40" selection-start-column="14" selection-end-line="40" selection-end-column="70" />
+        <state relative-caret-position="322">
+          <caret line="56" column="39" lean-forward="true" selection-start-line="55" selection-end-line="59" selection-end-column="96" />
           <folding>
             <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="940">
-          <caret line="47" column="19" lean-forward="true" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="19" />
+        <state relative-caret-position="-5768">
+          <caret line="255" column="48" lean-forward="true" selection-start-line="255" selection-start-column="48" selection-end-line="255" selection-end-column="48" />
           <folding>
             <element signature="e#18#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="160">
-          <caret line="8" column="37" lean-forward="true" selection-start-line="8" selection-start-column="37" selection-end-line="8" selection-end-column="37" />
+        <state relative-caret-position="3292">
+          <caret line="194" column="46" lean-forward="true" selection-start-line="194" selection-start-column="46" selection-end-line="194" selection-end-column="46" />
           <folding>
-            <element signature="e#0#10#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/utils/helper.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="302">
-          <caret line="56" column="39" lean-forward="true" selection-start-line="55" selection-end-line="59" selection-end-column="96" />
+        <state relative-caret-position="87">
+          <caret line="13" selection-start-line="13" selection-end-line="13" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#0#14#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="396">
-          <caret line="22" column="4" selection-start-line="22" selection-start-column="4" selection-end-line="22" selection-end-column="4" />
+        <state relative-caret-position="340">
+          <caret line="17" column="43" selection-start-line="17" selection-start-column="43" selection-end-line="17" selection-end-column="43" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-3216">
+          <caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/main.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="300">
+          <caret line="15" column="50" lean-forward="true" selection-start-line="15" selection-start-column="50" selection-end-line="15" selection-end-column="50" />
+          <folding>
+            <element signature="e#0#10#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="80">
+          <caret line="229" column="52" lean-forward="true" selection-start-line="229" selection-start-column="52" selection-end-line="229" selection-end-column="52" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="112">
-          <caret line="26" column="34" lean-forward="true" selection-start-line="26" selection-start-column="34" selection-end-line="26" selection-end-column="34" />
+        <state relative-caret-position="-774">
+          <caret line="209" column="59" lean-forward="true" selection-start-line="209" selection-start-column="59" selection-end-line="209" selection-end-column="59" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>

+ 2 - 2
hg3535/main.py

@@ -12,12 +12,12 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
 # execute(["scrapy", "crawl", "wqbodan"])
 # execute(["scrapy", "crawl", "bangqiu"])
 # execute(["scrapy", "crawl", "roll_zuqiu"]) # 滚球足球 回来要解开这个注释 其他全部解封
-# execute(["scrapy", "crawl", "roll_lanqiu"]) #滚球篮球
+execute(["scrapy", "crawl", "roll_lanqiu"]) #滚球篮球
 # execute(["scrapy", "crawl", "roll_wangqiu"]) #滚球网球
 # execute(["scrapy", "crawl", "roll_bangqiu"])  # 滚球棒球
 # execute(["scrapy", "crawl", "ball_status"]) #滚球id本地存
 # execute(["scrapy", "crawl", "ball_status_update"]) #滚球id结束时间更新状态
-execute(["scrapy", "crawl", "saiguo"]) #滚球id结束时间更新状态
+# execute(["scrapy", "crawl", "saiguo"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "lq_jieshu"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "wq_jieshu"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "bq_jieshu"]) #滚球id结束时间更新状态

+ 4 - 4
hg3535/pipeline/bangqiu.py

@@ -5,7 +5,7 @@ import logging
 
 from twisted.internet import defer, reactor
 
-from .ball_func import fuhao
+# from .ball_func import fuhao
 from ..utils.helper import Helper
 from .ball_func import new_time
 from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
@@ -187,7 +187,7 @@ class Bangqiupipeline(object):
                 odds_str = 'CO' + str(key) + str(match_id) + 'hg3535' + str(concedes_dict_rule[key]) + str(
                     value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(str(concedes_dict_rule[key]))
+                condition = str(concedes_dict_rule[key])
                 concedes_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                      "odds_only", "sole", "source", "type", "team"]
                 concedes_dict_value = [match_id, league_id, key, '0', 0, 'CO', value, condition,
@@ -202,7 +202,7 @@ class Bangqiupipeline(object):
                 odds_str = 'TN' + str(key) + str(match_id) + 'hg3535' + str(
                     total_size_dict_rule[key]) + str(value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(str(total_size_dict_rule[key]))
+                condition = str(total_size_dict_rule[key])
                 total_size_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                        "condition", "odds_only", "sole", "source", "type", "team"]
                 total_size_dict_value = [match_id, league_id, key, '0', 0, 'TN', value, condition,
@@ -264,7 +264,7 @@ class Bangqiupipeline(object):
                 odds_str = 'TS' + str(key) + str(match_id) + 'hg3535' + str(
                     odd_evens_dict_rule[key]) + str(value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(str(odd_evens_dict_rule[key]))
+                condition = str(odd_evens_dict_rule[key])
                 odd_evens_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                       "condition", "odds_only", "sole", "source", "type", "team"]
                 odd_evens_dict_value = [match_id, league_id, key, '0', 0, 'TS', value, condition,

+ 7 - 7
hg3535/pipeline/lanqiu.py

@@ -3,7 +3,7 @@ import pymongo
 import time
 import logging
 from twisted.internet import defer, reactor
-from .ball_func import fuhao
+# from .ball_func import fuhao
 
 from ..utils.helper import Helper
 from .ball_func import new_time
@@ -174,7 +174,7 @@ class Lanqiupipeline(object):
                         odds_str = 'CO' + str(index) + str(match_id) + 'hg3535' + str(
                             concedes_dict_rule[key][index]) + str(concedes_value)
                         odds_only = Helper.genearte_MD5(odds_str, pt)
-                        condition = fuhao(str(concedes_dict_rule[key][index]))
+                        condition = str(concedes_dict_rule[key][index])
                         concedes_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                              "condition", "odds_only", "sole", "source", "type", "team"]
                         concedes_dict_value = [match_id, league_id, key, '0', index, 'CO', concedes_value, condition,
@@ -187,7 +187,7 @@ class Lanqiupipeline(object):
                     odds_str = 'CO' + str(key) + str(match_id) + 'hg3535' + str(
                         concedes_dict_rule[key]) + str(value)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(str(concedes_dict_rule[key]))
+                    condition = str(concedes_dict_rule[key])
                     concedes_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                          "condition", "odds_only", "sole", "source", "type", "team"]
                     concedes_dict_value = [match_id, league_id, key, '0', 0, 'CO', value, condition,
@@ -202,7 +202,7 @@ class Lanqiupipeline(object):
                 odds_str = 'TS' + str(key) + str(match_id) + 'hg3535' + str(
                     odd_evens_dict_rule[key]) + str(value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(str(odd_evens_dict_rule[key]))
+                condition = str(odd_evens_dict_rule[key])
                 odd_evens_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                       "condition", "odds_only", "sole", "source", "type", "team"]
                 odd_evens_dict_value = [match_id, league_id, key, '0', 0, 'TS', value, condition,
@@ -219,7 +219,7 @@ class Lanqiupipeline(object):
                         odds_str = 'TN' + str(key) + str(match_id) + 'hg3535' + str(
                             total_sizes_dict_rule[key][index]) + str(total_sizes_value)
                         odds_only = Helper.genearte_MD5(odds_str, pt)
-                        condition = fuhao(str(total_sizes_dict_rule[key][index]))
+                        condition = str(total_sizes_dict_rule[key][index])
                         total_sizes_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                            "condition", "odds_only", "sole", "source", "type", "team"]
                         total_sizes_value = [match_id, league_id, key, '0', index, 'TN', total_sizes_value, condition,
@@ -232,7 +232,7 @@ class Lanqiupipeline(object):
                     odds_str = 'TN' + str(key) + str(match_id) + 'hg3535' + str(
                         total_sizes_dict_rule[key]) + str(value)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(str(total_sizes_dict_rule[key]))
+                    condition = str(total_sizes_dict_rule[key])
                     total_sizes_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                        "condition", "odds_only", "sole", "source", "type", "team"]
                     total_sizes_value = [match_id, league_id, key, '0', 0, 'TN', value, condition,
@@ -247,7 +247,7 @@ class Lanqiupipeline(object):
                 odds_str = 'TB' + str(key) + str(match_id) + 'hg3535' + str(
                     team_scores_dict_rule[key]) + str(value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(str(team_scores_dict_rule[key]))
+                condition = str(team_scores_dict_rule[key])
                 team_scores_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                    "condition", "odds_only", "sole", "source", "type", "team"]
                 team_scores_value = [match_id, league_id, key, '0', 0, 'TB', value, condition,

+ 4 - 4
hg3535/pipeline/roll_bangqiu.py

@@ -6,7 +6,7 @@ import logging
 
 from twisted.internet import defer, reactor
 
-from .ball_func import fuhao
+# from .ball_func import fuhao
 from ..utils.helper import Helper
 # from .ball_func import get_pcode, new_time, out_time
 # from concurrent.futures import ThreadPoolExecutor
@@ -148,7 +148,7 @@ class Roll_Banqiupipeline(object):
                     odds_str = 'CO' + str(key) + '0' + str(concedes_dict_rule[key]) + str(
                         value) + 'hg3535' + str(match_id)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(concedes_dict_rule[key])
+                    condition = concedes_dict_rule[key]
                     concedes_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                     "condition", "odds_only", "sole", "source", "type", "team"]
                     concedes_value = [match_id, league_id, key, "0", 0, 'CO', value, condition,
@@ -178,7 +178,7 @@ class Roll_Banqiupipeline(object):
                     odds_str = 'TN' + str(key) + '0' + str(total_size_dict_rule[key]) + str(
                         value) + 'hg3535' + str(match_id)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(total_size_dict_rule[key])
+                    condition = total_size_dict_rule[key]
                     total_size_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                       "condition", "odds_only", "sole", "source", "type", "team"]
                     total_size_value = [match_id, league_id, key, "0", 0, 'TN', value, condition,
@@ -193,7 +193,7 @@ class Roll_Banqiupipeline(object):
                 odds_str = 'TS' + str(key) + '0' + str(odd_evens_dict_rule[key]) + str(value) + 'hg3535' + str(
                     match_id)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(odd_evens_dict_rule[key])
+                condition = odd_evens_dict_rule[key]
                 odd_evens_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                  "condition", "odds_only", "sole", "source", "type", "team"]
                 odd_evens_value = [match_id, league_id, key, "0", 0, 'TS', value, condition,

+ 14 - 13
hg3535/pipeline/roll_lanqiu.py

@@ -6,7 +6,7 @@ import logging
 
 from twisted.internet import defer, reactor
 
-from .ball_func import fuhao
+# from .ball_func import
 from ..utils.helper import Helper
 from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
 
@@ -16,16 +16,17 @@ class Roll_Lanqiupipeline(object):
         self.mongo = pymongo.MongoClient(host=M_HOST, username=M_USER, password=M_PASSWORD, port=M_POST)
         self.db = self.mongo[M_DB]
 
-    @defer.inlineCallbacks
-    def process_item(self, item, spider):
-        out = defer.Deferred()
-        reactor.callInThread(self._do_calculation, item, out)
-        yield out
-        defer.returnValue(item)
-        # self._do_calculation(item)
-        # return
+    # @defer.inlineCallbacks
+    # def process_item(self, item, spider):
+    #     out = defer.Deferred()
+    #     reactor.callInThread(self._do_calculation, item, out)
+    #     yield out
+    #     defer.returnValue(item)
+    #     # self._do_calculation(item)
+    #     # return
 
-    def _do_calculation(self, item, out):
+    def process_item(self, item, spider):
+    # def _do_calculation(self, item, out):
         url = 'http://admin.5gogo.com'
         roll_lq = []
         # 使用twisted将mysql插入变成异步执行
@@ -155,7 +156,7 @@ class Roll_Lanqiupipeline(object):
                         sole = Helper.genearte_MD5(sole_str, pt)
                         concede_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                        "condition", "odds_only", "sole", "source", "type", "team"]
-                        condition = fuhao(concedes_dict_rule[key][index])
+                        condition = concedes_dict_rule[key][index]
                         concede_value = [match_id, league_id, key, "0", index, 'CO', concede_value, condition,
                                          odds_only, sole, "hg3535", "0", ""]
                         concede_data = dict(zip(concede_key, concede_value))
@@ -164,7 +165,7 @@ class Roll_Lanqiupipeline(object):
             for key, value in total_sizes_dict.items():
                 if value:
                     for index, total_sizes_value in enumerate(value):
-                        condition = fuhao(total_sizes_dict_rule[key][index])
+                        condition = total_sizes_dict_rule[key][index]
                         hash_str = "total_size" + str(key) + str(index) + str(condition) + str(
                             total_sizes_value) + "hg3535" + str(match_id)
                         sole_str = "total_size" + str(key) + str(index) + str(match_id) + "hg3535"
@@ -304,4 +305,4 @@ class Roll_Lanqiupipeline(object):
                 logger.warning('篮球滚球赛事结果数据,接口异常,提交失败, {}'.format(e))
         else:
             logger.info('篮球滚球赛事结果数据,为空不提交')
-        reactor.callFromThread(out.callback, item)
+        # reactor.callFromThread(out.callback, item)

+ 4 - 4
hg3535/pipeline/roll_wangqiu.py

@@ -3,7 +3,7 @@ import pymongo
 import time
 import logging
 import json
-from .ball_func import fuhao
+# from .ball_func import fuhao
 from ..utils.helper import Helper
 # from .ball_func import get_pcode, new_time, out_time
 # from concurrent.futures import ThreadPoolExecutor
@@ -174,7 +174,7 @@ class Roll_Wangqiupipeline(object):
                     odds_str = 'LD' + str(key) + '0' + str(concedes_dict_rule[key]) + str(
                         value) + 'hg3535' + str(match_id)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(concedes_dict_rule[key])
+                    condition = concedes_dict_rule[key]
                     concedes_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                     "condition", "odds_only", "sole", "source", "type", "team"]
                     concedes_value = [match_id, league_id, key, "0", 0, 'LD', value, condition,
@@ -191,7 +191,7 @@ class Roll_Wangqiupipeline(object):
                     odds_str = 'LB' + str(key) + '0' + str(bureaus_dict_rule[key]) + str(
                         value) + 'hg3535' + str(match_id)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(bureaus_dict_rule[key])
+                    condition = bureaus_dict_rule[key]
                     bureaus_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                    "condition", "odds_only", "sole", "source", "type", "team"]
                     bureaus_value = [match_id, league_id, key, "0", 0, 'LB', value, condition,
@@ -207,7 +207,7 @@ class Roll_Wangqiupipeline(object):
                     odds_str = 'TN' + str(key) + '0' + str(
                         total_number_dict_rule[key]) + str(value) + 'hg3535' + str(match_id)
                     odds_only = Helper.genearte_MD5(odds_str, pt)
-                    condition = fuhao(total_number_dict_rule[key])
+                    condition = total_number_dict_rule[key]
                     total_number_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                         "condition", "odds_only", "sole", "source", "type", "team"]
                     total_number_value = [match_id, league_id, key, "0", 0, 'TN', value,

+ 8 - 8
hg3535/pipeline/roll_zuqiu.py

@@ -133,7 +133,7 @@ class Roll_Zuqiupipeline(object):
             odds_onlys.append(odds_only)
             half_size_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                    "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(half_size_guest_rule[index])
+            condition = half_size_guest_rule[index]
             half_size_guest_value = [match_id, league_id, "gss_h", "0", index, p_code, value, condition,
                                      odds_only, sole, "hg3535", "0", ""]
             half_size_guest_data = dict(zip(half_size_guest_key, half_size_guest_value))
@@ -148,7 +148,7 @@ class Roll_Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             half_size_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                   "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(half_size_home_rule[index])
+            condition = half_size_home_rule[index]
             half_size_home_value = [match_id, league_id, "gsb_h", "0", index, p_code, value, condition,
                                     odds_only, sole, "hg3535", "0", ""]
             half_size_home_data = dict(zip(half_size_home_key, half_size_home_value))
@@ -168,7 +168,7 @@ class Roll_Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             size_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                              "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(size_home_rule[index])
+            condition = size_home_rule[index]
             size_home_value = [match_id, league_id, "gsb", "0", index, p_code, value, condition, odds_only,
                                sole, "hg3535", "0", ""]
             size_home_data = dict(zip(size_home_key, size_home_value))
@@ -183,7 +183,7 @@ class Roll_Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             size_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                               "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(size_guest_rule[index])
+            condition = size_guest_rule[index]
             size_guest_value = [match_id, league_id, "gss", "0", index, p_code, value, condition, odds_only,
                                 sole, "hg3535", "0", ""]
             size_home_data = dict(zip(size_guest_key, size_guest_value))
@@ -204,7 +204,7 @@ class Roll_Zuqiupipeline(object):
             odds_onlys.append(odds_only)
             half_concede_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                       "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(half_concede_guest_rule[index])
+            condition = half_concede_guest_rule[index]
             half_concede_guest_value = [match_id, league_id, "cog_h", "0", index, p_code, value, condition,
                                         odds_only, sole, "hg3535", "0", ""]
             half_concede_guest_data = dict(zip(half_concede_guest_key, half_concede_guest_value))
@@ -219,7 +219,7 @@ class Roll_Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             half_concede_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                      "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(half_concede_home_rule[index])
+            condition = half_concede_home_rule[index]
             half_concede_home_value = [match_id, league_id, "coh_h", "0", index, p_code, value, condition,
                                        odds_only, sole, "hg3535", "0", ""]
             half_concede_home_data = dict(zip(half_concede_home_key, half_concede_home_value))
@@ -238,7 +238,7 @@ class Roll_Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             concede_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                  "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(concede_guest[index])
+            condition = concede_guest[index]
             concede_guest_value = [match_id, league_id, "cog", "0", index, p_code, value, condition,
                                    odds_only, sole, "hg3535", "0", ""]
             concede_guest_data = dict(zip(concede_guest_key, concede_guest_value))
@@ -253,7 +253,7 @@ class Roll_Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             concede_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                 "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(concede_home_rule[index])
+            condition = concede_home_rule[index]
             concede_home_value = [match_id, league_id, "coh", "0", index, p_code, value, condition, odds_only,
                                   sole, "hg3535", "0", ""]
             concede_guest_data = dict(zip(concede_home_key, concede_home_value))

+ 5 - 5
hg3535/pipeline/wangqiu.py

@@ -5,7 +5,7 @@ import logging
 
 from twisted.internet import defer, reactor
 
-from .ball_func import fuhao
+# from .ball_func import fuhao
 from ..utils.helper import Helper
 from .ball_func import new_time, out_time
 from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
@@ -181,7 +181,7 @@ class Wangqiupipeline(object):
                 odds_str = 'LD' + str(key) + str(match_id) + 'hg3535' + str(concedes_dict_rule[key]) + str(
                     value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(concedes_dict_rule[key])
+                condition = concedes_dict_rule[key]
                 concedes_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                      "odds_only", "sole", "source", "type", "team"]
                 concedes_dict_value = [match_id, league_id, key, '0', 0, 'LD', value, condition,
@@ -196,7 +196,7 @@ class Wangqiupipeline(object):
                 odds_str = 'LB' + str(key) + str(match_id) + 'hg3535' + str(bureaus_dict_rule[key]) + str(
                     value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(bureaus_dict_rule[key])
+                condition = bureaus_dict_rule[key]
                 bureaus_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                     "odds_only", "sole", "source", "type", "team"]
                 bureaus_dict_value = [match_id, league_id, key, '0', 0, 'LB', value, condition,
@@ -211,7 +211,7 @@ class Wangqiupipeline(object):
                 odds_str = 'TN' + str(key) + str(match_id) + 'hg3535' + str(
                     total_number_dict_rule[key]) + str(value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(total_number_dict_rule[key])
+                condition = total_number_dict_rule[key]
                 total_number_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
                                          "condition",
                                          "odds_only", "sole", "source", "type", "team"]
@@ -227,7 +227,7 @@ class Wangqiupipeline(object):
                 odds_str = 'TS' + str(key) + str(match_id) + 'hg3535' + str(odd_evens_dict_rule[key]) + str(
                     value)
                 odds_only = Helper.genearte_MD5(odds_str, pt)
-                condition = fuhao(odd_evens_dict_rule[key])
+                condition = odd_evens_dict_rule[key]
                 odd_evens_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                       "odds_only", "sole", "source", "type", "team"]
                 odd_evens_dict_value = [match_id, league_id, key, '0', 0, 'TS', value, condition,

+ 5 - 5
hg3535/pipeline/zuqiu.py

@@ -144,7 +144,7 @@ class Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             half_size_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                    "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(half_size_guest_rule[index])
+            condition = half_size_guest_rule[index]
             half_size_guest_value = [match_id, league_id, "gss_h", "0", index, p_code, value, condition,
                                      odds_only, sole, "hg3535", "0", ""]
             half_size_guest_data = dict(zip(half_size_guest_key, half_size_guest_value))
@@ -158,7 +158,7 @@ class Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             half_size_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                   "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(half_size_home_rule[index])
+            condition = half_size_home_rule[index]
             half_size_home_value = [match_id, league_id, "gsb_h", "0", index, p_code, value, condition,
                                     odds_only, sole, "hg3535", "0", ""]
             half_size_home_data = dict(zip(half_size_home_key, half_size_home_value))
@@ -178,7 +178,7 @@ class Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             size_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                              "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(size_home_rule[index])
+            condition = size_home_rule[index]
             size_home_value = [match_id, league_id, "gsb", "0", index, p_code, value, condition, odds_only,
                                sole, "hg3535", "0", ""]
             size_home_data = dict(zip(size_home_key, size_home_value))
@@ -192,7 +192,7 @@ class Zuqiupipeline(object):
             sole = Helper.genearte_MD5(sole_str, pt)
             size_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                               "odds_only", "sole", "source", "type", "team"]
-            condition = fuhao(size_guest_rule[index])
+            condition = size_guest_rule[index]
             size_guest_value = [match_id, league_id, "gss", "0", index, p_code, value, condition, odds_only,
                                 sole, "hg3535", "0", ""]
             size_home_data = dict(zip(size_guest_key, size_guest_value))
@@ -213,7 +213,7 @@ class Zuqiupipeline(object):
                 sole = Helper.genearte_MD5(sole_str, pt)
                 half_concede_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
                                           "odds_only", "sole", "source", "type", "team"]
-                condition = fuhao(half_concede_guest_rule[index])
+                condition = half_concede_guest_rule[index]
                 half_concede_guest_value = [match_id, league_id, "cog_h", "0", index, p_code, value, condition,
                                             odds_only, sole, "hg3535", "0", ""]
                 half_concede_guest_data = dict(zip(half_concede_guest_key, half_concede_guest_value))

+ 533 - 537
hg3535/spiders/roll_lanqiu.py

@@ -77,577 +77,573 @@ class LanqiuSpider(scrapy.Spider):
             new_data = new_datas.get("es", "")
             # result = new_data[0]
             for result in new_data:
-                # 比赛id
-                game_id = str(result['k'])
-                # 球队1
-                team_home = result['i'][0]
-                # 球队2
-                team_guest = result['i'][1]
-                # 数量(97>)
-                number = result['i'][2]
-                # 比赛状态
-                zhuangtai = result['i'][3]
-                # 日期
-                data_game = result['i'][4]
-                # 开赛时间  滚球实际只有一个进行时间
-                # time_game = result['i'][5]
-                try:
-                    time_game = result['sb']['ct']
-                except:
-                    time_game = '00:00'
-                # 队1分数
-                score_home1 = result['i'][10]
-                # 队2分数
-                score_guest1 = result['i'][11]
-                # 第几节
-                jijie = result['i'][12]
-                # 球队得分
-                qiudui = result['pci'].get('ctn', "")
-                # ----------------------------------------让球分割线---------------------------------------------------------------------------
-                concedes_dict = {}
-                concedes_dict_rule = {}
-                try:
-                    concedes = result['o']["ah"]["v"]
-                    # print(concedes)
-                    # 主队让球条件,主队让球赔率,客队让球条件,客队让球赔率
-                    concede_home_rule, concede_home, concede_guest_rule, concede_guest = rangqiu_daxiao(inner=concedes)
-                    concedes_dict_rule['coh'] = concede_home_rule
-                    concedes_dict['coh'] = concede_home
-                    concedes_dict_rule['cog'] = concede_guest_rule
-                    concedes_dict['cog'] = concede_guest
-                except:
-                    concedes_dict_rule['coh'] = ""
-                    concedes_dict['coh'] = ""
-                    concedes_dict_rule['cog'] = ""
-                    concedes_dict['cog'] = ""
-                # print(concedes_dict)
-                try:
-                    half_concedes = result['o']["ah1st"]["v"]
-                    # 上半场 主队让球条件
-                    half_concede_home_rule, half_concede_home, half_concede_guest_rule, half_concede_guest = rangqiu_daxiao(inner=half_concedes)
-                    concedes_dict_rule['coh_h'] = half_concede_home_rule
-                    concedes_dict['coh_h'] = half_concede_home
-                    concedes_dict_rule['cog_h'] = half_concede_guest_rule
-                    concedes_dict['cog_h'] = half_concede_guest
-
-                except:
-                    concedes_dict_rule['coh_h'] = ""
-                    concedes_dict['coh_h'] = ""
-                    concedes_dict_rule['cog_h'] = ""
-                    concedes_dict['cog_h'] = ""
-
-                # 第一节让球
-                try:
-                    one_concedes = result['o']["ahq1"]["v"]
-                    one_concede_home_rule, one_concede_home, one_concede_guest_rule, one_concede_guest = rangqiu_daxiao(inner=one_concedes)
-                    concedes_dict_rule['coh_1'] = one_concede_home_rule
-                    concedes_dict['coh_1'] = one_concede_home
-                    concedes_dict_rule['cog_1'] = one_concede_guest_rule
-                    concedes_dict['cog_1'] = one_concede_guest
-
-                except:
-                    concedes_dict_rule['coh_1'] = ""
-                    concedes_dict['coh_1'] = ""
-                    concedes_dict_rule['cog_1'] = ""
-                    concedes_dict['cog_1'] = ""
-                # 第二节让球
-                try:
-                    two_concedes = result['o']["ahq2"]["v"]
-                    two_concede_home_rule, two_concede_home, two_concede_guest_rule, two_concede_guest = rangqiu_daxiao(inner=two_concedes)
-                    concedes_dict_rule['coh_2'] = two_concede_home_rule
-                    concedes_dict['coh_2'] = two_concede_home
-                    concedes_dict_rule['cog_2'] = two_concede_guest_rule
-                    concedes_dict['cog_2'] = two_concede_guest
-                except:
-                    concedes_dict_rule['coh_2'] = ""
-                    concedes_dict['coh_2'] = ""
-                    concedes_dict_rule['cog_2'] = ""
-                    concedes_dict['cog_2'] = ""
-                # 第三节让球
-                try:
-                    three_concedes = result['o']["ahq3"]["v"]
-                    three_concede_home_rule, three_concede_home, three_concede_guest_rule, three_concede_guest = rangqiu_daxiao(inner=three_concedes)
-                    concedes_dict_rule['coh_3'] = three_concede_home_rule
-                    concedes_dict['coh_3'] = three_concede_home
-                    concedes_dict_rule['cog_3'] = three_concede_guest_rule
-                    concedes_dict['cog_3'] = three_concede_guest
-
-                except:
-                    concedes_dict_rule['coh_3'] = ""
-                    concedes_dict['coh_3'] = ""
-                    concedes_dict_rule['cog_3'] = ""
-                    concedes_dict['cog_3'] = ""
-                # 第四节让球
-                try:
-                    four_concedes = result['o']["ahq4"]["v"]
-                    four_concede_home_rule, four_concede_home, four_concede_guest_rule, four_concede_guest = rangqiu_daxiao(inner=four_concedes)
-                    concedes_dict_rule['coh_4'] = four_concede_home_rule
-                    concedes_dict['coh_4'] = four_concede_home
-                    concedes_dict_rule['cog_4'] = four_concede_guest_rule
-                    concedes_dict['cog_4'] = four_concede_guest
-
-                except:
-                    concedes_dict_rule['coh_4'] = ""
-                    concedes_dict['coh_4'] = ""
-                    concedes_dict_rule['cog_4'] = ""
-                    concedes_dict['cog_4'] = ""
-                # ----------------------------------------总分大小分割线 - ---------------------------------------------------------------
-                # 全场总分大小
-                total_sizes_dict = {}
-                total_sizes_dict_rule = {}
-                try:
-                    total_sizes = result['o']["ou"]["v"]
-                    total_sizes_big_rule, total_sizes_big, total_sizes_small_rule, total_sizes_small = rangqiu_daxiao(inner=total_sizes)
-                    total_sizes_dict_rule["tnb"] = total_sizes_big_rule
-                    total_sizes_dict["tnb"] = total_sizes_big
-                    total_sizes_dict_rule["tns"] = total_sizes_small_rule
-                    total_sizes_dict["tns"] = total_sizes_small
-                except:
-                    total_sizes_dict_rule["tnb"] = ""
-                    total_sizes_dict["tnb"] = ""
-                    total_sizes_dict_rule["tns"] = ""
-                    total_sizes_dict["tns"] = ""
-                # 上半场总分大小
-                try:
-                    half_total_sizes = result['o']["ou1st"]["v"]
-                    half_total_sizes_big_rule, half_total_sizes_big, half_total_sizes_small_rule, half_total_sizes_small = rangqiu_daxiao(
-                        inner=half_total_sizes)
-                    total_sizes_dict_rule["tnb_h"] = half_total_sizes_big_rule
-                    total_sizes_dict["tnb_h"] = half_total_sizes_big
-                    total_sizes_dict_rule["tns_h"] = half_total_sizes_small_rule
-                    total_sizes_dict["tns_h"] = half_total_sizes_small
-                except:
-                    total_sizes_dict_rule["tnb_h"] = ""
-                    total_sizes_dict["tnb_h"] = ""
-                    total_sizes_dict_rule["tns_h"] = ""
-                    total_sizes_dict["tns_h"] = ""
-                # 第一节总分大小
-                try:
-                    one_total_sizes = result['o']["ou1st"]["v"]
-                    one_total_sizes_big_rule, one_total_sizes_big, one_total_sizes_small_rule, one_total_sizes_small = rangqiu_daxiao(
-                        inner=one_total_sizes)
-                    total_sizes_dict_rule["tnb_1"] = one_total_sizes_big_rule
-                    total_sizes_dict["tnb_1"] = one_total_sizes_big
-                    total_sizes_dict_rule["tns_1"] = one_total_sizes_small_rule
-                    total_sizes_dict["tns_1"] = one_total_sizes_small
-                except:
-                    total_sizes_dict_rule["tnb_1"] = ""
-                    total_sizes_dict["tnb_1"] = ""
-                    total_sizes_dict_rule["tns_1"] = ""
-                    total_sizes_dict["tns_1"] = ""
-                # 第二节场总分大小
-                try:
-                    two_total_sizes = result['o']["ou2st"]["v"]
-                    two_total_sizes_big_rule, two_total_sizes_big, two_total_sizes_small_rule, two_total_sizes_small = rangqiu_daxiao(
-                        inner=two_total_sizes)
-                    total_sizes_dict_rule["tnb_2"] = two_total_sizes_big_rule
-                    total_sizes_dict["tnb_2"] = two_total_sizes_big
-                    total_sizes_dict_rule["tns_2"] = two_total_sizes_small_rule
-                    total_sizes_dict["tns_2"] = two_total_sizes_small
-                except:
-                    total_sizes_dict_rule["tnb_2"] = ""
-                    total_sizes_dict["tnb_2"] = ""
-                    total_sizes_dict_rule["tns_2"] = ""
-                    total_sizes_dict["tns_2"] = ""
-                # 第三节总分大小
-                try:
-                    three_total_sizes = result['o']["ou3st"]["v"]
-                    three_total_sizes_big_rule, three_total_sizes_big, three_total_sizes_small_rule, three_total_sizes_small = rangqiu_daxiao(
-                        inner=three_total_sizes)
-                    total_sizes_dict_rule["tnb_3"] = three_total_sizes_big_rule
-                    total_sizes_dict["tnb_3"] = three_total_sizes_big
-                    total_sizes_dict_rule["tns_3"] = three_total_sizes_small_rule
-                    total_sizes_dict["tns_3"] = three_total_sizes_small
-                except:
-                    total_sizes_dict_rule["tnb_3"] = ""
-                    total_sizes_dict["tnb_3"] = ""
-                    total_sizes_dict_rule["tns_3"] = ""
-                    total_sizes_dict["tns_3"] = ""
-                # 第四节总分大小
-                try:
-                    four_total_sizes = result['o']["ou4st"]["v"]
-                    four_total_sizes_big_rule, four_total_sizes_big, four_total_sizes_small_rule, four_total_sizes_small = rangqiu_daxiao(
-                        inner=four_total_sizes)
-                    total_sizes_dict_rule["tnb_4"] = four_total_sizes_big_rule
-                    total_sizes_dict["tnb_4"] = four_total_sizes_big
-                    total_sizes_dict_rule["tns_4"] = four_total_sizes_small_rule
-                    total_sizes_dict["tns_4"] = four_total_sizes_small
-                except:
-                    total_sizes_dict_rule["tnb_4"] = ""
-                    total_sizes_dict["tnb_4"] = ""
-                    total_sizes_dict_rule["tns_4"] = ""
-                    total_sizes_dict["tns_4"] = ""
-
-                # ----------------------------------------总分单双分割线------------------------------------------------------------------
-                # 全场 总分单双
-                odd_evens_dict = {}
-                odd_evens_dict_rule = {}
-                try:
-                    odd_evens = result['o']["oe"]["v"]
-                    # 全场 总分单, 全场 总分双
-                    odd_evens_dict["tss"] = odd_evens[1]
-                    odd_evens_dict_rule['tss'] = '单'
-                    odd_evens_dict["tsd"] = odd_evens[3]
-                    odd_evens_dict_rule['tsd'] = '双'
-                except:
-                    odd_evens_dict["tss"] = ""
-                    odd_evens_dict_rule['tss'] = '单'
-                    odd_evens_dict["tsd"] = ""
-                    odd_evens_dict_rule['tsd'] = '双'
-                # 上半场全场 总分单双
-
-                try:
-                    half_odd_evens = result['o']["oe1st"]["v"]
-                    # 上半场 总分单, 上半场 总分双
-                    odd_evens_dict["tss_h"] = half_odd_evens[1]
-                    odd_evens_dict_rule['tss_h'] = '单'
-                    odd_evens_dict["tsd_h"] = half_odd_evens[3]
-                    odd_evens_dict_rule['tsd_h'] = '双'
-                except:
-                    # half_odd_even_odd = ""
-                    # half_odd_even_even = ""
-                    odd_evens_dict["tss_h"] = ""
-                    odd_evens_dict_rule['tss_h'] = '单'
-                    odd_evens_dict["tsd_h"] = ""
-                    odd_evens_dict_rule['tsd_h'] = '双'
-
-                # 总分:单/双-第一节
-                try:
-                    one_odd_evens = result['o']["oeq1"]["v"]
-                    odd_evens_dict["tss_1"] = one_odd_evens[1]
-                    odd_evens_dict_rule['tss_1'] = '单'
-                    odd_evens_dict["tsd_1"] = one_odd_evens[3]
-                    odd_evens_dict_rule['tsd_1'] = '双'
-                except:
-                    odd_evens_dict["tss_1"] = ""
-                    odd_evens_dict_rule['tss_1'] = '单'
-                    odd_evens_dict["tsd_1"] = ""
-                    odd_evens_dict_rule['tsd_1'] = '双'
-
-                # 总分:单/双-第二节
-                try:
-                    two_odd_evens = result['o']["oeq2"]["v"]
-                    odd_evens_dict["tss_2"] = two_odd_evens[1]
-                    odd_evens_dict_rule['tss_2'] = '单'
-                    odd_evens_dict["tsd_2"] = two_odd_evens[3]
-                    odd_evens_dict_rule['tsd_2'] = '双'
-                except:
-                    # two_odd_even_odd = ""
-                    # two_odd_even_even = ""
-                    odd_evens_dict["tss_2"] = ""
-                    odd_evens_dict_rule['tss_2'] = '单'
-                    odd_evens_dict["tsd_2"] = ""
-                    odd_evens_dict_rule['tsd_2'] = '双'
-
-                # 总分:单/双-第三节
-                try:
-                    three_odd_evens = result['o']["oeq3"]["v"]
-                    odd_evens_dict["tss_3"] = three_odd_evens[1]
-                    odd_evens_dict_rule['tss_3'] = '单'
-                    odd_evens_dict["tsd_3"] = three_odd_evens[3]
-                    odd_evens_dict_rule['tsd_3'] = '双'
-                except:
-                    odd_evens_dict["tss_3"] = ""
-                    odd_evens_dict_rule['tss_3'] = '单'
-                    odd_evens_dict["tsd_3"] = ""
-                    odd_evens_dict_rule['tsd_3'] = '双'
-
-                # 总分:单/双-第四节
-                try:
-                    four_odd_evens = result['o']["oeq4"]["v"]
-                    odd_evens_dict["tss_4"] = four_odd_evens[1]
-                    odd_evens_dict_rule['tss_4'] = '单'
-                    odd_evens_dict["tsd_4"] = four_odd_evens[3]
-                    odd_evens_dict_rule['tsd_4'] = '双'
-                except:
-                    odd_evens_dict["tss_4"] = ""
-                    odd_evens_dict_rule['tss_4'] = '单'
-                    odd_evens_dict["tsd_4"] = ""
-                    odd_evens_dict_rule['tsd_4'] = '双'
-
-                # ----------------------------------------球队得分最后一位数分割线---------------------------------------------------------
-                # 球队得分最后一位数 主队
-                last_numbers_dict = {}
-                try:
-                    last_numbers = result["p-o"][0]['o']
-                    last_home = {}
-                    for last_number in last_numbers:
-                        last_home[last_number[0]] = last_number[2]
-                except:
-                    last_home = {}
-                last_numbers_dict["last_home"] = last_home
-                # 球队得分最后一位数 客队
-                try:
-                    new_last_numbers = result["p-o"][1]['o']
-                    last_guest = {}
-                    for new_last_number in new_last_numbers:
-                        last_guest[new_last_number[0]] = new_last_number[2]
-                except:
-                    last_guest = {}
-                last_numbers_dict["last_guest"] = last_guest
-                # ------------------------------------------------------独赢分割线---------------------------------------------------------
-                capots_dict = {}
-                # 独赢
-                try:
-                    capots = result['o']["ml"]["v"]
-                    capot_list = [capots[i] for i in range(len(capots)) if i % 2 == 1]
-                    capot_home = capot_list[0]
-                    capot_guest = capot_list[1]
-                    capots_dict["ch"] = capot_home
-                    capots_dict["cg"] = capot_guest
-                except:
-                    capots_dict["ch"] = ""
-                    capots_dict["cg"] = ""
-
-                # 上半场独赢
-                try:
-                    half_capots = result['o']["ml1st"]["v"]
-                    half_capot_list = [half_capots[i] for i in range(len(half_capots)) if i % 2 == 1]
-                    half_capot_home = half_capot_list[0]
-                    half_capot_guest = half_capot_list[1]
-                    capots_dict["ch_h"] = half_capot_home
-                    capots_dict["cg_h"] = half_capot_guest
-                except:
-                    capots_dict["ch_h"] = ""
-                    capots_dict["cg_h"] = ""
+                ctid = result['pci']['ctid']
+                if ctid == 0:
+                    # 比赛id
+                    game_id = str(result['k'])
+                    # 球队1
+                    team_home = result['i'][0]
+                    # 球队2
+                    team_guest = result['i'][1]
+                    # 数量(97>)
+                    number = result['i'][2]
+                    # 比赛状态
+                    zhuangtai = result['i'][3]
+                    # 日期
+                    data_game = result['i'][4]
+                    # 开赛时间  滚球实际只有一个进行时间
+                    # time_game = result['i'][5]
+                    try:
+                        time_game = result['sb']['ct']
+                    except:
+                        time_game = '00:00'
+                    # 队1分数
+                    score_home1 = result['i'][10]
+                    # 队2分数
+                    score_guest1 = result['i'][11]
+                    # 第几节
+                    jijie = result['i'][12]
+                    # 球队得分
+                    qiudui = result['pci'].get('ctn', "")
+                    # ----------------------------------------让球分割线---------------------------------------------------------------------------
+                    concedes_dict = {}
+                    concedes_dict_rule = {}
+                    try:
+                        concedes = result['o']["ah"]["v"]
+                        # print(concedes)
+                        # 主队让球条件,主队让球赔率,客队让球条件,客队让球赔率
+                        concede_home_rule, concede_home, concede_guest_rule, concede_guest = rangqiu_daxiao(inner=concedes)
+                        concedes_dict_rule['coh'] = concede_home_rule
+                        concedes_dict['coh'] = concede_home
+                        concedes_dict_rule['cog'] = concede_guest_rule
+                        concedes_dict['cog'] = concede_guest
+                    except:
+                        concedes_dict_rule['coh'] = ""
+                        concedes_dict['coh'] = ""
+                        concedes_dict_rule['cog'] = ""
+                        concedes_dict['cog'] = ""
+                    # print(concedes_dict)
+                    try:
+                        half_concedes = result['o']["ah1st"]["v"]
+                        # 上半场 主队让球条件
+                        half_concede_home_rule, half_concede_home, half_concede_guest_rule, half_concede_guest = rangqiu_daxiao(inner=half_concedes)
+                        concedes_dict_rule['coh_h'] = half_concede_home_rule
+                        concedes_dict['coh_h'] = half_concede_home
+                        concedes_dict_rule['cog_h'] = half_concede_guest_rule
+                        concedes_dict['cog_h'] = half_concede_guest
 
-                # 第一节独赢
-                try:
-                    one_capots = result['o']["mlq1"]["v"]
-                    one_capot_list = [one_capots[i] for i in range(len(one_capots)) if i % 2 == 1]
-                    one_capot_home = one_capot_list[0]
-                    one_capot_guest = one_capot_list[1]
-                    capots_dict["ch_1"] = one_capot_home
-                    capots_dict["cg_1"] = one_capot_guest
-                except:
-                    capots_dict["ch_1"] = ""
-                    capots_dict["cg_1"] = ""
+                    except:
+                        concedes_dict_rule['coh_h'] = ""
+                        concedes_dict['coh_h'] = ""
+                        concedes_dict_rule['cog_h'] = ""
+                        concedes_dict['cog_h'] = ""
 
-                # 第二节独赢
-                try:
-                    two_capots = result['o']["mlq2"]["v"]
-                    two_capot_list = [two_capots[i] for i in range(len(two_capots)) if i % 2 == 1]
-                    two_capot_home = two_capot_list[0]
-                    two_capot_guest = two_capot_list[1]
-                    capots_dict["ch_2"] = two_capot_home
-                    capots_dict["cg_2"] = two_capot_guest
-                except:
-                    capots_dict["ch_2"] = ""
-                    capots_dict["cg_2"] = ""
+                    # 第一节让球
+                    try:
+                        one_concedes = result['o']["ahq1"]["v"]
+                        one_concede_home_rule, one_concede_home, one_concede_guest_rule, one_concede_guest = rangqiu_daxiao(inner=one_concedes)
+                        concedes_dict_rule['coh_1'] = one_concede_home_rule
+                        concedes_dict['coh_1'] = one_concede_home
+                        concedes_dict_rule['cog_1'] = one_concede_guest_rule
+                        concedes_dict['cog_1'] = one_concede_guest
 
-                # 第三节独赢
-                try:
-                    three_capots = result['o']["mlq3"]["v"]
-                    three_capot_list = [three_capots[i] for i in range(len(three_capots)) if i % 2 == 1]
-                    three_capot_home = three_capot_list[0]
-                    three_capot_guest = three_capot_list[1]
-                    capots_dict["ch_3"] = three_capot_home
-                    capots_dict["cg_3"] = three_capot_guest
-                except:
-                    capots_dict["ch_3"] = ""
-                    capots_dict["cg_3"] = ""
+                    except:
+                        concedes_dict_rule['coh_1'] = ""
+                        concedes_dict['coh_1'] = ""
+                        concedes_dict_rule['cog_1'] = ""
+                        concedes_dict['cog_1'] = ""
+                    # 第二节让球
+                    try:
+                        two_concedes = result['o']["ahq2"]["v"]
+                        two_concede_home_rule, two_concede_home, two_concede_guest_rule, two_concede_guest = rangqiu_daxiao(inner=two_concedes)
+                        concedes_dict_rule['coh_2'] = two_concede_home_rule
+                        concedes_dict['coh_2'] = two_concede_home
+                        concedes_dict_rule['cog_2'] = two_concede_guest_rule
+                        concedes_dict['cog_2'] = two_concede_guest
+                    except:
+                        concedes_dict_rule['coh_2'] = ""
+                        concedes_dict['coh_2'] = ""
+                        concedes_dict_rule['cog_2'] = ""
+                        concedes_dict['cog_2'] = ""
+                    # 第三节让球
+                    try:
+                        three_concedes = result['o']["ahq3"]["v"]
+                        three_concede_home_rule, three_concede_home, three_concede_guest_rule, three_concede_guest = rangqiu_daxiao(inner=three_concedes)
+                        concedes_dict_rule['coh_3'] = three_concede_home_rule
+                        concedes_dict['coh_3'] = three_concede_home
+                        concedes_dict_rule['cog_3'] = three_concede_guest_rule
+                        concedes_dict['cog_3'] = three_concede_guest
 
-                # 第四节独赢
-                try:
-                    four_capots = result['o']["mlq2"]["v"]
-                    four_capot_list = [four_capots[i] for i in range(len(four_capots)) if i % 2 == 1]
-                    four_capot_home = four_capot_list[0]
-                    four_capot_guest = four_capot_list[1]
-                    capots_dict["ch_4"] = four_capot_home
-                    capots_dict["cg_4"] = four_capot_guest
-                except:
-                    capots_dict["ch_4"] = ""
-                    capots_dict["cg_4"] = ""
+                    except:
+                        concedes_dict_rule['coh_3'] = ""
+                        concedes_dict['coh_3'] = ""
+                        concedes_dict_rule['cog_3'] = ""
+                        concedes_dict['cog_3'] = ""
+                    # 第四节让球
+                    try:
+                        four_concedes = result['o']["ahq4"]["v"]
+                        four_concede_home_rule, four_concede_home, four_concede_guest_rule, four_concede_guest = rangqiu_daxiao(inner=four_concedes)
+                        concedes_dict_rule['coh_4'] = four_concede_home_rule
+                        concedes_dict['coh_4'] = four_concede_home
+                        concedes_dict_rule['cog_4'] = four_concede_guest_rule
+                        concedes_dict['cog_4'] = four_concede_guest
 
-                # ---------------------------------------------------华丽分割线列表es[1]--------------------------------------------------
-                # 球队得分大/小 全场主队 home
-                team_scores_dict = {}
-                team_scores_dict_rule = {}
-                try:
-                    score_home = new_data[1]
-                except:
-                    score_home = ""
-                if score_home:
+                    except:
+                        concedes_dict_rule['coh_4'] = ""
+                        concedes_dict['coh_4'] = ""
+                        concedes_dict_rule['cog_4'] = ""
+                        concedes_dict['cog_4'] = ""
+                    # ----------------------------------------总分大小分割线 - ---------------------------------------------------------------
+                    # 全场总分大小
+                    total_sizes_dict = {}
+                    total_sizes_dict_rule = {}
                     try:
-                        score_homes = score_home["o"]["ou"]['v']
-                        score_home_big_rule, score_home_big, score_home_small_rule, score_home_small = rangqiu_daxiao(inner=score_homes)
-                        team_scores_dict_rule["tbhb"] = score_home_big_rule
-                        team_scores_dict["tbhb"] = score_home_big
-                        team_scores_dict_rule["tbhs"] = score_home_small_rule
-                        team_scores_dict["tbhs"] = score_home_small
+                        total_sizes = result['o']["ou"]["v"]
+                        total_sizes_big_rule, total_sizes_big, total_sizes_small_rule, total_sizes_small = rangqiu_daxiao(inner=total_sizes)
+                        total_sizes_dict_rule["tnb"] = total_sizes_big_rule
+                        total_sizes_dict["tnb"] = total_sizes_big
+                        total_sizes_dict_rule["tns"] = total_sizes_small_rule
+                        total_sizes_dict["tns"] = total_sizes_small
                     except:
-                        team_scores_dict_rule["tbhb"] = ""
-                        team_scores_dict["tbhb"] = ""
-                        team_scores_dict_rule["tbhs"] = ""
-                        team_scores_dict["tbhs"] = ""
-                    # 球队得分 上半场主队 home
+                        total_sizes_dict_rule["tnb"] = ""
+                        total_sizes_dict["tnb"] = ""
+                        total_sizes_dict_rule["tns"] = ""
+                        total_sizes_dict["tns"] = ""
+                    # 上半场总分大小
                     try:
-                        half_score_homes = score_home['o']['ou1st']['v']
-                        # 球队得分 上半场主队 大条件
-                        half_score_home_big_rule, half_score_home_big, half_score_home_small_rule, half_score_home_small = rangqiu_daxiao(
-                            inner=half_score_homes)
-                        team_scores_dict_rule["tbhb_h"] = half_score_home_big_rule
-                        team_scores_dict["tbhb_h"] = half_score_home_big
-                        team_scores_dict_rule["tbhs_h"] = half_score_home_small_rule
-                        team_scores_dict["tbhs_h"] = half_score_home_small
+                        half_total_sizes = result['o']["ou1st"]["v"]
+                        half_total_sizes_big_rule, half_total_sizes_big, half_total_sizes_small_rule, half_total_sizes_small = rangqiu_daxiao(
+                            inner=half_total_sizes)
+                        total_sizes_dict_rule["tnb_h"] = half_total_sizes_big_rule
+                        total_sizes_dict["tnb_h"] = half_total_sizes_big
+                        total_sizes_dict_rule["tns_h"] = half_total_sizes_small_rule
+                        total_sizes_dict["tns_h"] = half_total_sizes_small
                     except:
-                        team_scores_dict_rule["tbhb_h"] = ""
-                        team_scores_dict["tbhb_h"] = ""
-                        team_scores_dict_rule["tbhs_h"] = ""
-                        team_scores_dict["tbhs_h"] = ""
-
-                    # 球队得分:主队-大 / 小-第一节
+                        total_sizes_dict_rule["tnb_h"] = ""
+                        total_sizes_dict["tnb_h"] = ""
+                        total_sizes_dict_rule["tns_h"] = ""
+                        total_sizes_dict["tns_h"] = ""
+                    # 第一节总分大小
                     try:
-                        one_score_homes = score_home['o']["ouq1"]["v"]
-                        one_score_home_big_rule, one_score_home_big, one_score_home_small_rule, one_score_home_small = rangqiu_daxiao(
-                            inner=one_score_homes)
-                        team_scores_dict_rule["tbhb_1"] = one_score_home_big_rule
-                        team_scores_dict["tbhb_1"] = one_score_home_big
-                        team_scores_dict_rule["tbhs_1"] = one_score_home_small_rule
-                        team_scores_dict["tbhs_1"] = one_score_home_small
+                        one_total_sizes = result['o']["ou1st"]["v"]
+                        one_total_sizes_big_rule, one_total_sizes_big, one_total_sizes_small_rule, one_total_sizes_small = rangqiu_daxiao(
+                            inner=one_total_sizes)
+                        total_sizes_dict_rule["tnb_1"] = one_total_sizes_big_rule
+                        total_sizes_dict["tnb_1"] = one_total_sizes_big
+                        total_sizes_dict_rule["tns_1"] = one_total_sizes_small_rule
+                        total_sizes_dict["tns_1"] = one_total_sizes_small
                     except:
-                        team_scores_dict_rule["tbhb_1"] = ""
-                        team_scores_dict["tbhb_1"] = ""
-                        team_scores_dict_rule["tbhs_1"] = ""
-                        team_scores_dict["tbhs_1"] = ""
-
-                    # 球队得分:主队-大 / 小-第二节
+                        total_sizes_dict_rule["tnb_1"] = ""
+                        total_sizes_dict["tnb_1"] = ""
+                        total_sizes_dict_rule["tns_1"] = ""
+                        total_sizes_dict["tns_1"] = ""
+                    # 第二节场总分大小
                     try:
-                        two_score_homes = score_home['o']["ouq2"]["v"]
-                        two_score_home_big_rule, two_score_home_big, two_score_home_small_rule, two_score_home_small = rangqiu_daxiao(
-                            inner=two_score_homes)
-                        team_scores_dict_rule["tbhb_2"] = two_score_home_big_rule
-                        team_scores_dict["tbhb_2"] = two_score_home_big
-                        team_scores_dict_rule["tbhs_2"] = two_score_home_small_rule
-                        team_scores_dict["tbhs_2"] = two_score_home_small
+                        two_total_sizes = result['o']["ou2st"]["v"]
+                        two_total_sizes_big_rule, two_total_sizes_big, two_total_sizes_small_rule, two_total_sizes_small = rangqiu_daxiao(
+                            inner=two_total_sizes)
+                        total_sizes_dict_rule["tnb_2"] = two_total_sizes_big_rule
+                        total_sizes_dict["tnb_2"] = two_total_sizes_big
+                        total_sizes_dict_rule["tns_2"] = two_total_sizes_small_rule
+                        total_sizes_dict["tns_2"] = two_total_sizes_small
                     except:
-                        team_scores_dict_rule["tbhb_2"] = ""
-                        team_scores_dict["tbhb_2"] = ""
-                        team_scores_dict_rule["tbhs_2"] = ""
-                        team_scores_dict["tbhs_2"] = ""
+                        total_sizes_dict_rule["tnb_2"] = ""
+                        total_sizes_dict["tnb_2"] = ""
+                        total_sizes_dict_rule["tns_2"] = ""
+                        total_sizes_dict["tns_2"] = ""
+                    # 第三节总分大小
+                    try:
+                        three_total_sizes = result['o']["ou3st"]["v"]
+                        three_total_sizes_big_rule, three_total_sizes_big, three_total_sizes_small_rule, three_total_sizes_small = rangqiu_daxiao(
+                            inner=three_total_sizes)
+                        total_sizes_dict_rule["tnb_3"] = three_total_sizes_big_rule
+                        total_sizes_dict["tnb_3"] = three_total_sizes_big
+                        total_sizes_dict_rule["tns_3"] = three_total_sizes_small_rule
+                        total_sizes_dict["tns_3"] = three_total_sizes_small
+                    except:
+                        total_sizes_dict_rule["tnb_3"] = ""
+                        total_sizes_dict["tnb_3"] = ""
+                        total_sizes_dict_rule["tns_3"] = ""
+                        total_sizes_dict["tns_3"] = ""
+                    # 第四节总分大小
+                    try:
+                        four_total_sizes = result['o']["ou4st"]["v"]
+                        four_total_sizes_big_rule, four_total_sizes_big, four_total_sizes_small_rule, four_total_sizes_small = rangqiu_daxiao(
+                            inner=four_total_sizes)
+                        total_sizes_dict_rule["tnb_4"] = four_total_sizes_big_rule
+                        total_sizes_dict["tnb_4"] = four_total_sizes_big
+                        total_sizes_dict_rule["tns_4"] = four_total_sizes_small_rule
+                        total_sizes_dict["tns_4"] = four_total_sizes_small
+                    except:
+                        total_sizes_dict_rule["tnb_4"] = ""
+                        total_sizes_dict["tnb_4"] = ""
+                        total_sizes_dict_rule["tns_4"] = ""
+                        total_sizes_dict["tns_4"] = ""
+
+                    # ----------------------------------------总分单双分割线------------------------------------------------------------------
+                    # 全场 总分单双
+                    odd_evens_dict = {}
+                    odd_evens_dict_rule = {}
+                    try:
+                        odd_evens = result['o']["oe"]["v"]
+                        # 全场 总分单, 全场 总分双
+                        odd_evens_dict["tss"] = odd_evens[1]
+                        odd_evens_dict_rule['tss'] = '单'
+                        odd_evens_dict["tsd"] = odd_evens[3]
+                        odd_evens_dict_rule['tsd'] = '双'
+                    except:
+                        odd_evens_dict["tss"] = ""
+                        odd_evens_dict_rule['tss'] = '单'
+                        odd_evens_dict["tsd"] = ""
+                        odd_evens_dict_rule['tsd'] = '双'
+                    # 上半场全场 总分单双
 
-                    # 球队得分:主队-大 / 小-第三节
                     try:
-                        three_score_homes = score_home['o']["ouq3"]["v"]
-                        three_score_home_big_rule, three_score_home_big, three_score_home_small_rule, three_score_home_small = rangqiu_daxiao(
-                            inner=three_score_homes)
-                        team_scores_dict_rule["tbhb_3"] = three_score_home_big_rule
-                        team_scores_dict["tbhb_3"] = three_score_home_big
-                        team_scores_dict_rule["tbhs_3"] = three_score_home_small_rule
-                        team_scores_dict["tbhs_3"] = three_score_home_small
+                        half_odd_evens = result['o']["oe1st"]["v"]
+                        # 上半场 总分单, 上半场 总分双
+                        odd_evens_dict["tss_h"] = half_odd_evens[1]
+                        odd_evens_dict_rule['tss_h'] = '单'
+                        odd_evens_dict["tsd_h"] = half_odd_evens[3]
+                        odd_evens_dict_rule['tsd_h'] = '双'
+                    except:
+                        # half_odd_even_odd = ""
+                        # half_odd_even_even = ""
+                        odd_evens_dict["tss_h"] = ""
+                        odd_evens_dict_rule['tss_h'] = '单'
+                        odd_evens_dict["tsd_h"] = ""
+                        odd_evens_dict_rule['tsd_h'] = '双'
+
+                    # 总分:单/双-第一节
+                    try:
+                        one_odd_evens = result['o']["oeq1"]["v"]
+                        odd_evens_dict["tss_1"] = one_odd_evens[1]
+                        odd_evens_dict_rule['tss_1'] = '单'
+                        odd_evens_dict["tsd_1"] = one_odd_evens[3]
+                        odd_evens_dict_rule['tsd_1'] = '双'
                     except:
-                        team_scores_dict_rule["tbhb_3"] = ""
-                        team_scores_dict["tbhb_3"] = ""
-                        team_scores_dict_rule["tbhs_3"] = ""
-                        team_scores_dict["tbhs_3"] = ""
+                        odd_evens_dict["tss_1"] = ""
+                        odd_evens_dict_rule['tss_1'] = '单'
+                        odd_evens_dict["tsd_1"] = ""
+                        odd_evens_dict_rule['tsd_1'] = '双'
 
-                    # 球队得分:主队-大 / 小-第四节
+                    # 总分:单/双-第二节
                     try:
-                        four_score_homes = score_home['o']["ouq4"]["v"]
-                        four_score_home_big_rule, four_score_home_big, four_score_home_small_rule, four_score_home_small = rangqiu_daxiao(
-                            inner=four_score_homes)
-                        team_scores_dict_rule["tbhb_4"] = four_score_home_big_rule
-                        team_scores_dict["tbhb_4"] = four_score_home_big
-                        team_scores_dict_rule["tbhs_4"] = four_score_home_small_rule
-                        team_scores_dict["tbhs_4"] = four_score_home_small
+                        two_odd_evens = result['o']["oeq2"]["v"]
+                        odd_evens_dict["tss_2"] = two_odd_evens[1]
+                        odd_evens_dict_rule['tss_2'] = '单'
+                        odd_evens_dict["tsd_2"] = two_odd_evens[3]
+                        odd_evens_dict_rule['tsd_2'] = '双'
                     except:
-                        team_scores_dict_rule["tbhs_4"] = ""
-                        team_scores_dict["tbhb_4"] = ""
-                        team_scores_dict_rule["tbhs_4"] = ""
-                        team_scores_dict["tbhs_4"] = ""
+                        # two_odd_even_odd = ""
+                        # two_odd_even_even = ""
+                        odd_evens_dict["tss_2"] = ""
+                        odd_evens_dict_rule['tss_2'] = '单'
+                        odd_evens_dict["tsd_2"] = ""
+                        odd_evens_dict_rule['tsd_2'] = '双'
+
+                    # 总分:单/双-第三节
+                    try:
+                        three_odd_evens = result['o']["oeq3"]["v"]
+                        odd_evens_dict["tss_3"] = three_odd_evens[1]
+                        odd_evens_dict_rule['tss_3'] = '单'
+                        odd_evens_dict["tsd_3"] = three_odd_evens[3]
+                        odd_evens_dict_rule['tsd_3'] = '双'
+                    except:
+                        odd_evens_dict["tss_3"] = ""
+                        odd_evens_dict_rule['tss_3'] = '单'
+                        odd_evens_dict["tsd_3"] = ""
+                        odd_evens_dict_rule['tsd_3'] = '双'
 
-                # ---------------------------------------------------华丽分割线列表es[2]--------------------------------------------------
-                # 球队得分 客队 guest
-                try:
-                    score_guest = new_data[2]
-                except:
-                    score_guest = ""
-                if score_guest:
+                    # 总分:单/双-第四节
+                    try:
+                        four_odd_evens = result['o']["oeq4"]["v"]
+                        odd_evens_dict["tss_4"] = four_odd_evens[1]
+                        odd_evens_dict_rule['tss_4'] = '单'
+                        odd_evens_dict["tsd_4"] = four_odd_evens[3]
+                        odd_evens_dict_rule['tsd_4'] = '双'
+                    except:
+                        odd_evens_dict["tss_4"] = ""
+                        odd_evens_dict_rule['tss_4'] = '单'
+                        odd_evens_dict["tsd_4"] = ""
+                        odd_evens_dict_rule['tsd_4'] = '双'
+
+                    # ----------------------------------------球队得分最后一位数分割线---------------------------------------------------------
+                    # 球队得分最后一位数 主队
+                    last_numbers_dict = {}
                     try:
-                        # 球队得分: 大 / 小
-                        score_guests = score_guest["o"]["ou"]['v']
-                        score_guest_big_rule, score_guest_big, score_guest_small_rule, score_guest_small = rangqiu_daxiao(inner=score_guests)
-                        team_scores_dict_rule["tbgb"] = score_guest_big_rule
-                        team_scores_dict["tbgb"] = score_guest_big
-                        team_scores_dict_rule["tbgs"] = score_guest_small_rule
-                        team_scores_dict["tbgs"] = score_guest_small
+                        last_numbers = result["p-o"][0]['o']
+                        last_home = {}
+                        for last_number in last_numbers:
+                            last_home[last_number[0]] = last_number[2]
                     except:
-                        team_scores_dict_rule["tbgb"] = ""
-                        team_scores_dict["tbgb"] = ""
-                        team_scores_dict_rule["tbgs"] = ""
-                        team_scores_dict["tbgs"] = ""
+                        last_home = {}
+                    last_numbers_dict["last_home"] = last_home
+                    # 球队得分最后一位数 客队
+                    try:
+                        new_last_numbers = result["p-o"][1]['o']
+                        last_guest = {}
+                        for new_last_number in new_last_numbers:
+                            last_guest[new_last_number[0]] = new_last_number[2]
+                    except:
+                        last_guest = {}
+                    last_numbers_dict["last_guest"] = last_guest
+                    # ------------------------------------------------------独赢分割线---------------------------------------------------------
+                    capots_dict = {}
+                    # 独赢
+                    try:
+                        capots = result['o']["ml"]["v"]
+                        capot_list = [capots[i] for i in range(len(capots)) if i % 2 == 1]
+                        capot_home = capot_list[0]
+                        capot_guest = capot_list[1]
+                        capots_dict["ch"] = capot_home
+                        capots_dict["cg"] = capot_guest
+                    except:
+                        capots_dict["ch"] = ""
+                        capots_dict["cg"] = ""
 
-                    # 球队得分 上半场客队 guest
+                    # 上半场独赢
                     try:
-                        half_score_guests = score_guest["o"]['ou1st']['v']
-                        half_score_guest_big_rule, half_score_guest_big, half_score_guest_small_rule, half_score_guest_small = rangqiu_daxiao(
-                            inner=half_score_guests)
-                        team_scores_dict_rule["tbgb_h"] = half_score_guest_big_rule
-                        team_scores_dict["tbgb_h"] = half_score_guest_big
-                        team_scores_dict_rule["tbgs_h"] = half_score_guest_small_rule
-                        team_scores_dict["tbgs_h"] = half_score_guest_small
+                        half_capots = result['o']["ml1st"]["v"]
+                        half_capot_list = [half_capots[i] for i in range(len(half_capots)) if i % 2 == 1]
+                        half_capot_home = half_capot_list[0]
+                        half_capot_guest = half_capot_list[1]
+                        capots_dict["ch_h"] = half_capot_home
+                        capots_dict["cg_h"] = half_capot_guest
                     except:
-                        team_scores_dict_rule["tbgb_h"] = ""
-                        team_scores_dict["tbgb_h"] = ""
-                        team_scores_dict_rule["tbgs_h"] = ""
-                        team_scores_dict["tbgs_h"] = ""
-                    # 球队得分第一节
+                        capots_dict["ch_h"] = ""
+                        capots_dict["cg_h"] = ""
+
+                    # 第一节独赢
                     try:
-                        one_score_guests = score_guest["o"]['ouq1']['v']
-                        one_score_guest_big_rule, one_score_guest_big, one_score_guest_small_rule, one_score_guest_small = rangqiu_daxiao(
-                            inner=one_score_guests)
-                        team_scores_dict_rule["tbgb_1"] = one_score_guest_big_rule
-                        team_scores_dict["tbgb_1"] = one_score_guest_big
-                        team_scores_dict_rule["tbgs_1"] = one_score_guest_small_rule
-                        team_scores_dict["tbgs_1"] = one_score_guest_small
+                        one_capots = result['o']["mlq1"]["v"]
+                        one_capot_list = [one_capots[i] for i in range(len(one_capots)) if i % 2 == 1]
+                        one_capot_home = one_capot_list[0]
+                        one_capot_guest = one_capot_list[1]
+                        capots_dict["ch_1"] = one_capot_home
+                        capots_dict["cg_1"] = one_capot_guest
                     except:
-                        team_scores_dict_rule["tbgb_1"] = ""
-                        team_scores_dict["tbgb_1"] = ""
-                        team_scores_dict_rule["tbgs_1"] = ""
-                        team_scores_dict["tbgs_1"] = ""
+                        capots_dict["ch_1"] = ""
+                        capots_dict["cg_1"] = ""
 
-                    # 球队得分第二节
+                    # 第二节独赢
                     try:
-                        two_score_guests = score_guest["o"]['ouq2']['v']
-                        two_score_guest_big_rule, two_score_guest_big, two_score_guest_small_rule, two_score_guest_small = rangqiu_daxiao(
-                            inner=two_score_guests)
-                        team_scores_dict_rule["tbgb_2"] = two_score_guest_big_rule
-                        team_scores_dict["tbgb_2"] = two_score_guest_big
-                        team_scores_dict_rule["tbgs_2"] = two_score_guest_small_rule
-                        team_scores_dict["tbgs_2"] = two_score_guest_small
+                        two_capots = result['o']["mlq2"]["v"]
+                        two_capot_list = [two_capots[i] for i in range(len(two_capots)) if i % 2 == 1]
+                        two_capot_home = two_capot_list[0]
+                        two_capot_guest = two_capot_list[1]
+                        capots_dict["ch_2"] = two_capot_home
+                        capots_dict["cg_2"] = two_capot_guest
                     except:
-                        team_scores_dict_rule["tbgb_2"] = ""
-                        team_scores_dict["tbgb_2"] = ""
-                        team_scores_dict_rule["tbgs_2"] = ""
-                        team_scores_dict["tbgs_2"] = ""
-                    # 球队得分第三节
+                        capots_dict["ch_2"] = ""
+                        capots_dict["cg_2"] = ""
+
+                    # 第三节独赢
                     try:
-                        three_score_guests = score_guest["o"]['ouq3']['v']
-                        three_score_guest_big_rule, three_score_guest_big, three_score_guest_small_rule, three_score_guest_small = rangqiu_daxiao(
-                            inner=three_score_guests)
-                        team_scores_dict_rule["tbgb_3"] = three_score_guest_big_rule
-                        team_scores_dict["tbgb_3"] = three_score_guest_big
-                        team_scores_dict_rule["tbgs_3"] = three_score_guest_small_rule
-                        team_scores_dict["tbgs_3"] = three_score_guest_small
+                        three_capots = result['o']["mlq3"]["v"]
+                        three_capot_list = [three_capots[i] for i in range(len(three_capots)) if i % 2 == 1]
+                        three_capot_home = three_capot_list[0]
+                        three_capot_guest = three_capot_list[1]
+                        capots_dict["ch_3"] = three_capot_home
+                        capots_dict["cg_3"] = three_capot_guest
                     except:
-                        team_scores_dict_rule["tbgb_3"] = ""
-                        team_scores_dict["tbgb_3"] = ""
-                        team_scores_dict_rule["tbgs_3"] = ""
-                        team_scores_dict["tbgs_3"] = ""
-                    # 球队得分第四节
+                        capots_dict["ch_3"] = ""
+                        capots_dict["cg_3"] = ""
+
+                    # 第四节独赢
                     try:
-                        four_score_guests = score_guest["o"]['ouq4']['v']
-                        four_score_guest_big_rule, four_score_guest_big, four_score_guest_small_rule, four_score_guest_small = rangqiu_daxiao(
-                            inner=four_score_guests)
-                        team_scores_dict_rule["tbgb_4"] = four_score_guest_big_rule
-                        team_scores_dict["tbgb_4"] = four_score_guest_big
-                        team_scores_dict_rule["tbgs_4"] = four_score_guest_small_rule
-                        team_scores_dict["tbgs_4"] = four_score_guest_small
+                        four_capots = result['o']["mlq2"]["v"]
+                        four_capot_list = [four_capots[i] for i in range(len(four_capots)) if i % 2 == 1]
+                        four_capot_home = four_capot_list[0]
+                        four_capot_guest = four_capot_list[1]
+                        capots_dict["ch_4"] = four_capot_home
+                        capots_dict["cg_4"] = four_capot_guest
                     except:
-                        team_scores_dict_rule["tbgb_4"] = ""
-                        team_scores_dict["tbgb_4"] = ""
-                        team_scores_dict_rule["tbgs_4"] = ""
-                        team_scores_dict["tbgs_4"] = ""
+                        capots_dict["ch_4"] = ""
+                        capots_dict["cg_4"] = ""
+
+                # ---------------------------------------------------华丽分割线列表es[1]--------------------------------------------------
+                # 球队得分大/小 全场主队 home
+                team_scores_dict = {}
+                team_scores_dict_rule = {}
+                if ctid == 41:
+                    if result:
+                        try:
+                            score_homes = result["o"]["ou"]['v']
+                            score_home_big_rule, score_home_big, score_home_small_rule, score_home_small = rangqiu_daxiao(inner=score_homes)
+                            team_scores_dict_rule["tbhb"] = score_home_big_rule
+                            team_scores_dict["tbhb"] = score_home_big
+                            team_scores_dict_rule["tbhs"] = score_home_small_rule
+                            team_scores_dict["tbhs"] = score_home_small
+                        except:
+                            team_scores_dict_rule["tbhb"] = ""
+                            team_scores_dict["tbhb"] = ""
+                            team_scores_dict_rule["tbhs"] = ""
+                            team_scores_dict["tbhs"] = ""
+                        # 球队得分 上半场主队 home
+                        try:
+                            half_score_homes = result['o']['ou1st']['v']
+                            # 球队得分 上半场主队 大条件
+                            half_score_home_big_rule, half_score_home_big, half_score_home_small_rule, half_score_home_small = rangqiu_daxiao(
+                                inner=half_score_homes)
+                            team_scores_dict_rule["tbhb_h"] = half_score_home_big_rule
+                            team_scores_dict["tbhb_h"] = half_score_home_big
+                            team_scores_dict_rule["tbhs_h"] = half_score_home_small_rule
+                            team_scores_dict["tbhs_h"] = half_score_home_small
+                        except:
+                            team_scores_dict_rule["tbhb_h"] = ""
+                            team_scores_dict["tbhb_h"] = ""
+                            team_scores_dict_rule["tbhs_h"] = ""
+                            team_scores_dict["tbhs_h"] = ""
+
+                        # 球队得分:主队-大 / 小-第一节
+                        try:
+                            one_score_homes = result['o']["ouq1"]["v"]
+                            one_score_home_big_rule, one_score_home_big, one_score_home_small_rule, one_score_home_small = rangqiu_daxiao(
+                                inner=one_score_homes)
+                            team_scores_dict_rule["tbhb_1"] = one_score_home_big_rule
+                            team_scores_dict["tbhb_1"] = one_score_home_big
+                            team_scores_dict_rule["tbhs_1"] = one_score_home_small_rule
+                            team_scores_dict["tbhs_1"] = one_score_home_small
+                        except:
+                            team_scores_dict_rule["tbhb_1"] = ""
+                            team_scores_dict["tbhb_1"] = ""
+                            team_scores_dict_rule["tbhs_1"] = ""
+                            team_scores_dict["tbhs_1"] = ""
+
+                        # 球队得分:主队-大 / 小-第二节
+                        try:
+                            two_score_homes = result['o']["ouq2"]["v"]
+                            two_score_home_big_rule, two_score_home_big, two_score_home_small_rule, two_score_home_small = rangqiu_daxiao(
+                                inner=two_score_homes)
+                            team_scores_dict_rule["tbhb_2"] = two_score_home_big_rule
+                            team_scores_dict["tbhb_2"] = two_score_home_big
+                            team_scores_dict_rule["tbhs_2"] = two_score_home_small_rule
+                            team_scores_dict["tbhs_2"] = two_score_home_small
+                        except:
+                            team_scores_dict_rule["tbhb_2"] = ""
+                            team_scores_dict["tbhb_2"] = ""
+                            team_scores_dict_rule["tbhs_2"] = ""
+                            team_scores_dict["tbhs_2"] = ""
+
+                        # 球队得分:主队-大 / 小-第三节
+                        try:
+                            three_score_homes = result['o']["ouq3"]["v"]
+                            three_score_home_big_rule, three_score_home_big, three_score_home_small_rule, three_score_home_small = rangqiu_daxiao(
+                                inner=three_score_homes)
+                            team_scores_dict_rule["tbhb_3"] = three_score_home_big_rule
+                            team_scores_dict["tbhb_3"] = three_score_home_big
+                            team_scores_dict_rule["tbhs_3"] = three_score_home_small_rule
+                            team_scores_dict["tbhs_3"] = three_score_home_small
+                        except:
+                            team_scores_dict_rule["tbhb_3"] = ""
+                            team_scores_dict["tbhb_3"] = ""
+                            team_scores_dict_rule["tbhs_3"] = ""
+                            team_scores_dict["tbhs_3"] = ""
+
+                        # 球队得分:主队-大 / 小-第四节
+                        try:
+                            four_score_homes = result['o']["ouq4"]["v"]
+                            four_score_home_big_rule, four_score_home_big, four_score_home_small_rule, four_score_home_small = rangqiu_daxiao(
+                                inner=four_score_homes)
+                            team_scores_dict_rule["tbhb_4"] = four_score_home_big_rule
+                            team_scores_dict["tbhb_4"] = four_score_home_big
+                            team_scores_dict_rule["tbhs_4"] = four_score_home_small_rule
+                            team_scores_dict["tbhs_4"] = four_score_home_small
+                        except:
+                            team_scores_dict_rule["tbhs_4"] = ""
+                            team_scores_dict["tbhb_4"] = ""
+                            team_scores_dict_rule["tbhs_4"] = ""
+                            team_scores_dict["tbhs_4"] = ""
+
+                # ---------------------------------------------------华丽分割线列表es[2]--------------------------------------------------
+                # 球队得分 客队 guest
+                if ctid == 42:
+                    if result:
+                        try:
+                            # 球队得分: 大 / 小
+                            score_guests = result["o"]["ou"]['v']
+                            score_guest_big_rule, score_guest_big, score_guest_small_rule, score_guest_small = rangqiu_daxiao(inner=score_guests)
+                            team_scores_dict_rule["tbgb"] = score_guest_big_rule
+                            team_scores_dict["tbgb"] = score_guest_big
+                            team_scores_dict_rule["tbgs"] = score_guest_small_rule
+                            team_scores_dict["tbgs"] = score_guest_small
+                        except:
+                            team_scores_dict_rule["tbgb"] = ""
+                            team_scores_dict["tbgb"] = ""
+                            team_scores_dict_rule["tbgs"] = ""
+                            team_scores_dict["tbgs"] = ""
+
+                        # 球队得分 上半场客队 guest
+                        try:
+                            half_score_guests = result["o"]['ou1st']['v']
+                            half_score_guest_big_rule, half_score_guest_big, half_score_guest_small_rule, half_score_guest_small = rangqiu_daxiao(
+                                inner=half_score_guests)
+                            team_scores_dict_rule["tbgb_h"] = half_score_guest_big_rule
+                            team_scores_dict["tbgb_h"] = half_score_guest_big
+                            team_scores_dict_rule["tbgs_h"] = half_score_guest_small_rule
+                            team_scores_dict["tbgs_h"] = half_score_guest_small
+                        except:
+                            team_scores_dict_rule["tbgb_h"] = ""
+                            team_scores_dict["tbgb_h"] = ""
+                            team_scores_dict_rule["tbgs_h"] = ""
+                            team_scores_dict["tbgs_h"] = ""
+                        # 球队得分第一节
+                        try:
+                            one_score_guests = result["o"]['ouq1']['v']
+                            one_score_guest_big_rule, one_score_guest_big, one_score_guest_small_rule, one_score_guest_small = rangqiu_daxiao(
+                                inner=one_score_guests)
+                            team_scores_dict_rule["tbgb_1"] = one_score_guest_big_rule
+                            team_scores_dict["tbgb_1"] = one_score_guest_big
+                            team_scores_dict_rule["tbgs_1"] = one_score_guest_small_rule
+                            team_scores_dict["tbgs_1"] = one_score_guest_small
+                        except:
+                            team_scores_dict_rule["tbgb_1"] = ""
+                            team_scores_dict["tbgb_1"] = ""
+                            team_scores_dict_rule["tbgs_1"] = ""
+                            team_scores_dict["tbgs_1"] = ""
+
+                        # 球队得分第二节
+                        try:
+                            two_score_guests = result["o"]['ouq2']['v']
+                            two_score_guest_big_rule, two_score_guest_big, two_score_guest_small_rule, two_score_guest_small = rangqiu_daxiao(
+                                inner=two_score_guests)
+                            team_scores_dict_rule["tbgb_2"] = two_score_guest_big_rule
+                            team_scores_dict["tbgb_2"] = two_score_guest_big
+                            team_scores_dict_rule["tbgs_2"] = two_score_guest_small_rule
+                            team_scores_dict["tbgs_2"] = two_score_guest_small
+                        except:
+                            team_scores_dict_rule["tbgb_2"] = ""
+                            team_scores_dict["tbgb_2"] = ""
+                            team_scores_dict_rule["tbgs_2"] = ""
+                            team_scores_dict["tbgs_2"] = ""
+                        # 球队得分第三节
+                        try:
+                            three_score_guests = result["o"]['ouq3']['v']
+                            three_score_guest_big_rule, three_score_guest_big, three_score_guest_small_rule, three_score_guest_small = rangqiu_daxiao(
+                                inner=three_score_guests)
+                            team_scores_dict_rule["tbgb_3"] = three_score_guest_big_rule
+                            team_scores_dict["tbgb_3"] = three_score_guest_big
+                            team_scores_dict_rule["tbgs_3"] = three_score_guest_small_rule
+                            team_scores_dict["tbgs_3"] = three_score_guest_small
+                        except:
+                            team_scores_dict_rule["tbgb_3"] = ""
+                            team_scores_dict["tbgb_3"] = ""
+                            team_scores_dict_rule["tbgs_3"] = ""
+                            team_scores_dict["tbgs_3"] = ""
+                        # 球队得分第四节
+                        try:
+                            four_score_guests = result["o"]['ouq4']['v']
+                            four_score_guest_big_rule, four_score_guest_big, four_score_guest_small_rule, four_score_guest_small = rangqiu_daxiao(
+                                inner=four_score_guests)
+                            team_scores_dict_rule["tbgb_4"] = four_score_guest_big_rule
+                            team_scores_dict["tbgb_4"] = four_score_guest_big
+                            team_scores_dict_rule["tbgs_4"] = four_score_guest_small_rule
+                            team_scores_dict["tbgs_4"] = four_score_guest_small
+                        except:
+                            team_scores_dict_rule["tbgb_4"] = ""
+                            team_scores_dict["tbgb_4"] = ""
+                            team_scores_dict_rule["tbgs_4"] = ""
+                            team_scores_dict["tbgs_4"] = ""
                 # 篮球详细比分
                 score_dict = {}
                 try: