Your Name 6 år sedan
förälder
incheckning
09ab7b587d

+ 188 - 285
hg3535/.idea/workspace.xml

@@ -1,27 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="7fa42e97-ddea-4404-91db-5a9ccc162649" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/spiders/zq_jieshu.py" afterDir="false" />
+    <list default="true" id="7fa42e97-ddea-4404-91db-5a9ccc162649" name="Default Changelist" comment="'更新日志按天输出'">
       <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$/kaishi.py" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/main_notroll.py" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/main_time.py" beforeDir="false" afterPath="$PROJECT_DIR$/main_time.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pip" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/pipelines.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipelines.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scrapy-magicfields)" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/bangqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hg3535_bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_bangqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hg3535_lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_lanqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hg3535_wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_wangqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hg3535_zq_status.py" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hg3535_zq_status_up.py" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hg3535_zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_zuqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/hgjieshu.py" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/lanqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/wangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/settings.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -31,7 +15,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="1558689420236" 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="1558943356275" 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$" />
@@ -58,74 +42,23 @@
     <favorites_list name="hg3535" />
   </component>
   <component name="FileEditorManager">
-    <leaf>
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <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="297">
-              <caret line="145" column="24" lean-forward="true" selection-start-line="145" selection-start-column="24" selection-end-line="145" selection-end-column="24" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/main_time.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="133">
-              <caret line="24" column="43" lean-forward="true" selection-start-line="24" selection-start-column="43" selection-end-line="24" selection-end-column="43" />
-              <folding>
-                <element signature="e#0#11#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="2754">
+              <caret line="153" column="18" lean-forward="true" selection-start-line="153" selection-start-column="18" selection-end-line="153" selection-end-column="18" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-25">
-              <caret line="19" column="25" lean-forward="true" selection-start-line="19" selection-start-column="25" selection-end-line="19" selection-end-column="25" />
-              <folding>
-                <element signature="e#46#61#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/pipelines.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="198">
-              <caret line="11" lean-forward="true" selection-start-line="11" selection-end-line="11" />
+            <state relative-caret-position="378">
+              <caret line="27" column="14" lean-forward="true" selection-start-line="27" selection-start-column="14" selection-end-line="27" selection-end-column="14" />
               <folding>
                 <element signature="e#0#11#0" expanded="true" />
-                <element signature="e#653#19776#0" />
-                <element signature="e#19929#28277#0" />
-                <element signature="e#28431#36861#0" />
-                <element signature="e#37017#41760#0" />
-                <element signature="e#41914#49824#0" />
-                <element signature="e#49975#56284#0" />
-                <element signature="e#56435#64250#0" />
-                <element signature="e#64420#81052#0" />
-                <element signature="e#81104#94781#0" />
-                <element signature="e#94835#108888#0" />
-                <element signature="e#108941#122901#0" />
-                <element signature="e#123056#124489#0" />
-                <element signature="e#124426#125640#0" />
-                <element signature="e#125797#127222#0" />
-                <element signature="e#127205#128456#0" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/ball_func.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-2743">
-              <caret line="442" selection-start-line="442" selection-end-line="442" />
-              <folding>
-                <element signature="e#0#15#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -142,7 +75,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>htft</find>
       <find>half_capot</find>
       <find>capot</find>
       <find>t1</find>
@@ -172,16 +104,54 @@
       <find>Lanqiustatus</find>
       <find>new_times</find>
       <find>status</find>
+      <find>3206572</find>
     </findStrings>
   </component>
   <component name="Git.Settings">
     <option name="UPDATE_TYPE" value="MERGE" />
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
+    <option name="RECENT_BRANCH_BY_REPOSITORY">
+      <map>
+        <entry key="$PROJECT_DIR$/.." value="origin/HEAD" />
+      </map>
+    </option>
+    <favorite-branches>
+      <branch-storage>
+        <map>
+          <entry type="LOCAL">
+            <value>
+              <list>
+                <branch-info repo="$PROJECT_DIR$/.." source="two" />
+              </list>
+            </value>
+          </entry>
+        </map>
+      </branch-storage>
+    </favorite-branches>
+    <excluded-from-favorite>
+      <branch-storage>
+        <map>
+          <entry type="LOCAL">
+            <value>
+              <list>
+                <branch-info repo="$PROJECT_DIR$/.." source="master" />
+              </list>
+            </value>
+          </entry>
+          <entry type="REMOTE">
+            <value>
+              <list>
+                <branch-info repo="$PROJECT_DIR$/.." source="origin/master" />
+              </list>
+            </value>
+          </entry>
+        </map>
+      </branch-storage>
+    </excluded-from-favorite>
   </component>
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/spiders/rangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/totalball.py" />
         <option value="$PROJECT_DIR$/spiders/wangqiuls.py" />
         <option value="$PROJECT_DIR$/spiders/temaball.py" />
@@ -212,7 +182,6 @@
         <option value="$PROJECT_DIR$/spiders/guanjun.py" />
         <option value="$PROJECT_DIR$/text.py" />
         <option value="$PROJECT_DIR$/middlewares.py" />
-        <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
         <option value="$PROJECT_DIR$/spiders/hg3535_zq_status_up.py" />
         <option value="$PROJECT_DIR$/spiders/liansai.py" />
         <option value="$PROJECT_DIR$/spiders/lanqiu.py" />
@@ -220,23 +189,25 @@
         <option value="$PROJECT_DIR$/spiders/bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/hg3535_bangqiu.py" />
         <option value="$PROJECT_DIR$/items.py" />
+        <option value="$PROJECT_DIR$/spiders/hg3535_lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
+        <option value="$PROJECT_DIR$/main_time.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/ball_func.py" />
         <option value="$PROJECT_DIR$/spiders/zq_jieshu.py" />
-        <option value="$PROJECT_DIR$/spiders/wq_jieshu.py" />
         <option value="$PROJECT_DIR$/spiders/lq_jieshu.py" />
+        <option value="$PROJECT_DIR$/spiders/wq_jieshu.py" />
         <option value="$PROJECT_DIR$/spiders/bq_jieshu.py" />
-        <option value="$PROJECT_DIR$/spiders/hg3535_lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
         <option value="$PROJECT_DIR$/main.py" />
-        <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
-        <option value="$PROJECT_DIR$/settings.py" />
         <option value="$PROJECT_DIR$/pipelines.py" />
-        <option value="$PROJECT_DIR$/ball_func.py" />
-        <option value="$PROJECT_DIR$/main_time.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
+        <option value="$PROJECT_DIR$/settings.py" />
       </list>
     </option>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-8" />
+    <option name="x" value="343" />
     <option name="y" value="-8" />
     <option name="width" value="1936" />
     <option name="height" value="1066" />
@@ -247,7 +218,6 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
-      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -255,11 +225,6 @@
               <item name="hg3535" type="b2602c69:ProjectViewProjectNode" />
               <item name="hg3535" type="462c0819:PsiDirectoryNode" />
             </path>
-            <path>
-              <item name="hg3535" type="b2602c69:ProjectViewProjectNode" />
-              <item name="hg3535" type="462c0819:PsiDirectoryNode" />
-              <item name="spiders" type="462c0819:PsiDirectoryNode" />
-            </path>
             <path>
               <item name="hg3535" type="b2602c69:ProjectViewProjectNode" />
               <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
@@ -268,6 +233,7 @@
           <select />
         </subPane>
       </pane>
+      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -411,10 +377,10 @@
     </configuration>
     <recent_temporary>
       <list>
-        <item itemvalue="Python.main" />
-        <item itemvalue="Python.hgjieshu" />
         <item itemvalue="Python.wangqiu" />
+        <item itemvalue="Python.main" />
         <item itemvalue="Python.liansai" />
+        <item itemvalue="Python.hgjieshu" />
         <item itemvalue="Python.halffull" />
       </list>
     </recent_temporary>
@@ -516,7 +482,8 @@
       <workItem from="1558438097772" duration="25035000" />
       <workItem from="1558506590036" duration="13475000" />
       <workItem from="1558523229860" duration="749000" />
-      <workItem from="1558529201114" duration="62016000" />
+      <workItem from="1558529201114" duration="63104000" />
+      <workItem from="1558918879384" duration="20712000" />
     </task>
     <task id="LOCAL-00001" summary="修改后,版本二">
       <created>1555727493584</created>
@@ -662,7 +629,7 @@
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="1537411000" />
+    <option name="totallyTimeSpent" value="1559211000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -675,9 +642,8 @@
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
-    <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.17803837" />
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.17963752" />
       <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" />
@@ -687,12 +653,12 @@
       <window_info anchor="bottom" id="Inspection" order="4" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="5" weight="0.32832617" />
       <window_info anchor="bottom" id="Docker" order="6" show_stripe_button="false" />
-      <window_info anchor="bottom" id="Version Control" order="7" weight="0.2918455" />
+      <window_info anchor="bottom" id="Version Control" order="7" weight="0.1555794" />
       <window_info anchor="bottom" id="Database Changes" order="8" />
       <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50586355" side_tool="true" weight="0.39055794" />
       <window_info anchor="bottom" x="22" y="376" width="1876" height="298" id="Terminal" order="10" sideWeight="0.49413645" weight="0.38626608" />
       <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.4356223" />
-      <window_info anchor="bottom" id="Run" order="12" sideWeight="0.4946695" visible="true" weight="0.39806867" />
+      <window_info anchor="bottom" id="Run" order="12" sideWeight="0.4946695" weight="0.24248926" />
       <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" />
@@ -733,6 +699,32 @@
   <component name="UnknownFeatures">
     <option featureType="com.intellij.fileTypeFactory" implementationName="*.log" />
   </component>
+  <component name="Vcs.Log.Tabs.Properties">
+    <option name="TAB_STATES">
+      <map>
+        <entry key="MAIN">
+          <value>
+            <State>
+              <option name="RECENTLY_FILTERED_USER_GROUPS">
+                <collection />
+              </option>
+              <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
+                <collection />
+              </option>
+              <option name="COLUMN_ORDER">
+                <list>
+                  <option value="0" />
+                  <option value="1" />
+                  <option value="2" />
+                  <option value="3" />
+                </list>
+              </option>
+            </State>
+          </value>
+        </entry>
+      </map>
+    </option>
+  </component>
   <component name="VcsManagerConfiguration">
     <MESSAGE value="修改后,版本二" />
     <MESSAGE value="修改联赛url" />
@@ -791,28 +783,8 @@
     </expressions>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/site-packages/scrapy/crawler.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="150">
-          <caret line="81" selection-start-line="81" selection-end-line="81" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/log/liansai_2019_5_22.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-199074" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/text.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="252">
-          <caret line="14" column="13" lean-forward="true" selection-start-line="14" selection-start-column="13" selection-end-line="14" selection-end-column="13" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/log/liansai_2019_5_22.log" />
+    <entry file="file://$PROJECT_DIR$/text.py" />
     <entry file="file://$PROJECT_DIR$/../../sports_scrapy - 副本/sports_scrapy - 副本/hg3535/spiders/hg3535_bq_status.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-90">
@@ -820,16 +792,8 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/log/liansai_2019_5_23.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-21011" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/log/bangqiu_2019_5_23.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-266" />
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/log/liansai_2019_5_23.log" />
+    <entry file="file://$PROJECT_DIR$/log/bangqiu_2019_5_23.log" />
     <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/site-packages/scrapy/utils/python.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="195">
@@ -916,28 +880,9 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/log/guanjun_2019_5_23.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-769591" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/log/wangqiu_2019_5_23.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-4134">
-          <caret line="28" column="133" lean-forward="true" selection-start-line="28" selection-start-column="67" selection-end-line="28" selection-end-column="144" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/kaishi.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="162">
-          <caret line="9" column="15" lean-forward="true" selection-start-line="9" selection-start-column="15" selection-end-line="9" selection-end-column="15" />
-          <folding>
-            <element signature="e#0#13#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/log/guanjun_2019_5_23.log" />
+    <entry file="file://$PROJECT_DIR$/log/wangqiu_2019_5_23.log" />
+    <entry file="file://$PROJECT_DIR$/kaishi.py" />
     <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/site-packages/parsel/selector.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="161">
@@ -945,31 +890,9 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/log/bangqiu_2019_5_24.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-4564" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/middlewares.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="288">
-          <caret line="142" column="17" selection-start-line="142" selection-start-column="17" selection-end-line="142" selection-end-column="17" />
-          <folding>
-            <element signature="e#168#181#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/log/liansai_2019_5_24.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-4696" />
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/log/lanqiu_2019_5_24.log">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1674" />
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/log/bangqiu_2019_5_24.log" />
+    <entry file="file://$PROJECT_DIR$/log/liansai_2019_5_24.log" />
+    <entry file="file://$PROJECT_DIR$/log/lanqiu_2019_5_24.log" />
     <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/site-packages/scrapy/spiderloader.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="154">
@@ -984,223 +907,203 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/lq_jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="186">
-          <caret line="17" selection-start-line="17" selection-end-line="18" selection-end-column="104" />
+        <state relative-caret-position="2808">
+          <caret line="197" column="113" selection-start-line="197" selection-start-column="113" selection-end-line="197" selection-end-column="113" />
           <folding>
-            <element signature="e#24#39#0" expanded="true" />
+            <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zq_jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="324">
-          <caret line="18" selection-start-line="18" selection-end-line="19" selection-end-column="104" />
+        <state relative-caret-position="606">
+          <caret line="43" column="45" selection-start-line="43" selection-start-column="45" selection-end-line="43" selection-end-column="45" />
           <folding>
-            <element signature="e#36#51#0" expanded="true" />
+            <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/hg3535_zq_status_up.py" />
+    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="72">
-          <caret line="14" column="9" lean-forward="true" selection-start-line="14" selection-end-line="14" selection-end-column="36" />
+        <state relative-caret-position="342">
+          <caret line="53" lean-forward="true" selection-start-line="53" selection-end-line="53" />
           <folding>
             <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/liansai.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
+        <state relative-caret-position="192">
+          <caret line="37" column="14" selection-start-line="37" selection-start-column="12" selection-end-line="37" selection-end-column="23" />
           <folding>
             <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2808">
-          <caret line="197" column="113" selection-start-line="197" selection-start-column="113" selection-end-line="197" selection-end-column="113" />
+        <state relative-caret-position="252">
+          <caret line="38" column="20" selection-start-line="38" selection-start-column="12" selection-end-line="38" selection-end-column="24" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/bq_jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/hg3535_zq_status.py" />
+    <entry file="file://$PROJECT_DIR$/main_notroll.py" />
+    <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="180">
-          <caret line="10" column="22" lean-forward="true" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="22" />
+        <state relative-caret-position="-25">
+          <caret line="19" column="25" lean-forward="true" selection-start-line="19" selection-start-column="25" selection-end-line="19" selection-end-column="25" />
           <folding>
-            <element signature="e#24#39#0" expanded="true" />
+            <element signature="e#46#61#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/guanjun.py">
+    <entry file="file://$PROJECT_DIR$/spiders/liansai.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="606">
-          <caret line="43" column="45" selection-start-line="43" selection-start-column="45" selection-end-line="43" selection-end-column="45" />
+        <state relative-caret-position="270">
+          <caret line="22" selection-start-line="22" selection-end-line="22" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/hg3535_zq_status_up.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1176">
-          <caret line="236" column="39" lean-forward="true" selection-start-line="235" selection-end-line="237" selection-end-column="108" />
-          <folding>
-            <element signature="e#25#40#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="87">
+          <caret line="152" column="14" selection-start-line="152" selection-start-column="14" selection-end-line="152" selection-end-column="14" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/main_time.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="342">
-          <caret line="53" lean-forward="true" selection-start-line="53" selection-end-line="53" />
-          <folding>
-            <element signature="e#24#35#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="144">
+          <caret line="11" selection-start-line="11" selection-end-line="11" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wq_jieshu.py">
+    <entry file="file://$PROJECT_DIR$/ball_func.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="306">
-          <caret line="17" column="1" selection-start-line="17" selection-start-column="1" selection-end-line="18" selection-end-column="104" />
+        <state relative-caret-position="-90">
+          <caret line="400" column="53" lean-forward="true" selection-start-line="400" selection-start-column="53" selection-end-line="400" selection-end-column="53" />
           <folding>
-            <element signature="e#24#39#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main.py">
+    <entry file="file://$PROJECT_DIR$/log/zq_jieshu_2019_5_27.log">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="378">
-          <caret line="21" column="56" lean-forward="true" selection-start-line="21" selection-start-column="56" selection-end-line="21" selection-end-column="56" />
-          <folding>
-            <element signature="e#0#10#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="-50826">
+          <caret line="4699" selection-start-line="4699" selection-end-line="4699" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="87">
-          <caret line="152" column="14" selection-start-line="152" selection-start-column="14" selection-end-line="152" selection-end-column="14" />
+        <state relative-caret-position="18">
+          <caret line="20" selection-start-line="20" selection-end-line="21" selection-end-column="106" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zq_jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="192">
-          <caret line="37" column="14" selection-start-line="37" selection-start-column="12" selection-end-line="37" selection-end-column="23" />
+        <state relative-caret-position="196">
+          <caret line="61" selection-start-line="61" selection-end-line="65" selection-end-column="30" />
           <folding>
-            <element signature="e#24#39#0" expanded="true" />
+            <element signature="e#36#51#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/bq_jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="252">
-          <caret line="38" column="20" selection-start-line="38" selection-start-column="12" selection-end-line="38" selection-end-column="24" />
+        <state relative-caret-position="324">
+          <caret line="44" column="60" lean-forward="true" selection-start-line="44" selection-start-column="60" selection-end-line="44" selection-end-column="60" />
           <folding>
             <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/hg3535_zq_status.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wq_jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="180">
-          <caret line="175" column="27" lean-forward="true" selection-start-line="175" selection-start-column="27" selection-end-line="175" selection-end-column="27" />
+        <state relative-caret-position="463">
+          <caret line="54" column="94" selection-start-line="54" selection-start-column="94" selection-end-line="54" selection-end-column="94" />
+          <folding>
+            <element signature="e#24#39#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main_notroll.py">
+    <entry file="file://$PROJECT_DIR$/spiders/lq_jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state>
+        <state relative-caret-position="277">
+          <caret line="47" column="23" lean-forward="true" selection-start-line="47" selection-start-column="23" selection-end-line="47" selection-end-column="23" />
           <folding>
-            <element signature="e#0#11#0" expanded="true" />
+            <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/settings.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="297">
-          <caret line="145" column="24" lean-forward="true" selection-start-line="145" selection-start-column="24" selection-end-line="145" selection-end-column="24" />
+        <state relative-caret-position="378">
+          <caret line="21" selection-start-line="21" selection-end-line="22" selection-end-column="101" />
+          <folding>
+            <element signature="e#24#35#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipelines.py">
+    <entry file="file://$PROJECT_DIR$/middlewares.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="198">
-          <caret line="11" lean-forward="true" selection-start-line="11" selection-end-line="11" />
+        <state relative-caret-position="299">
+          <caret line="137" column="10" lean-forward="true" selection-start-line="137" selection-start-column="8" selection-end-line="137" selection-end-column="34" />
           <folding>
-            <element signature="e#0#11#0" expanded="true" />
-            <element signature="e#653#19776#0" />
-            <element signature="e#19929#28277#0" />
-            <element signature="e#28431#36861#0" />
-            <element signature="e#37017#41760#0" />
-            <element signature="e#41914#49824#0" />
-            <element signature="e#49975#56284#0" />
-            <element signature="e#56435#64250#0" />
-            <element signature="e#64420#81052#0" />
-            <element signature="e#81104#94781#0" />
-            <element signature="e#94835#108888#0" />
-            <element signature="e#108941#122901#0" />
-            <element signature="e#123056#124489#0" />
-            <element signature="e#124426#125640#0" />
-            <element signature="e#125797#127222#0" />
-            <element signature="e#127205#128456#0" />
+            <element signature="e#168#181#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/ball_func.py">
+    <entry file="file://$PROJECT_DIR$/main.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-2743">
-          <caret line="442" selection-start-line="442" selection-end-line="442" />
+        <state relative-caret-position="360">
+          <caret line="20" column="56" lean-forward="true" selection-start-line="20" selection-start-column="56" selection-end-line="20" selection-end-column="56" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#0#10#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main_time.py">
+    <entry file="file://$PROJECT_DIR$/settings.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="133">
-          <caret line="24" column="43" lean-forward="true" selection-start-line="24" selection-start-column="43" selection-end-line="24" selection-end-column="43" />
-          <folding>
-            <element signature="e#0#11#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="2754">
+          <caret line="153" column="18" lean-forward="true" selection-start-line="153" selection-start-column="18" selection-end-line="153" selection-end-column="18" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipelines.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-25">
-          <caret line="19" column="25" lean-forward="true" selection-start-line="19" selection-start-column="25" selection-end-line="19" selection-end-column="25" />
+        <state relative-caret-position="378">
+          <caret line="27" column="14" lean-forward="true" selection-start-line="27" selection-start-column="14" selection-end-line="27" selection-end-column="14" />
           <folding>
-            <element signature="e#46#61#0" expanded="true" />
+            <element signature="e#0#11#0" expanded="true" />
           </folding>
         </state>
       </provider>

BIN
hg3535/__pycache__/ball_func.cpython-36.pyc


BIN
hg3535/__pycache__/pipelines.cpython-36.pyc


BIN
hg3535/__pycache__/settings.cpython-36.pyc


+ 1 - 1
hg3535/ball_func.py

@@ -394,7 +394,7 @@ def get_pcode(corner_ball, code):
 
 
 
-# ------------------------------------------------------------------------------------------------------------------------
+# ----------------------------------------------------------------------------------------------------------------------
 def new_times(ctime):
     time1 = time.mktime(time.strptime(ctime, '%Y-%m-%d %H:%M:%S')) + 43200
     time2 = time.localtime(time1)

+ 2 - 2
hg3535/main.py

@@ -17,7 +17,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
 # execute(["scrapy", "crawl", "roll_bangqiu"]) #滚球棒球
 # execute(["scrapy", "crawl", "ball_status"]) #滚球id本地存
 # execute(["scrapy", "crawl", "ball_status_update"]) #滚球id结束时间更新状态
-# execute(["scrapy", "crawl", "zq_jieshu"]) #滚球id结束时间更新状态
-execute(["scrapy", "crawl", "lq_jieshu"]) #滚球id结束时间更新状态
+execute(["scrapy", "crawl", "zq_jieshu"]) #滚球id结束时间更新状态
+# execute(["scrapy", "crawl", "lq_jieshu"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "wq_jieshu"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "bq_jieshu"]) #滚球id结束时间更新状态

+ 100 - 21
hg3535/pipelines.py

@@ -2,6 +2,7 @@ import json
 import time
 import redis
 import logging
+# import requests
 # from twisted.enterprise import adbapi
 from scrapy.conf import settings
 import psycopg2
@@ -20,7 +21,6 @@ class Zuqiupipeline(object):
         self.conn = psycopg2.connect(host=settings["POST_HOST"], port=settings['POST_PORT'], user=settings["POST_USER"],
                                      password=settings["POST_PASSWORD"], database=settings["POST_DATABASE"])
         self.cursor = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
-
     def process_item(self, item, spider):
         # 使用twisted将mysql插入变成异步执行
         logger = logging.getLogger(__name__)
@@ -32,9 +32,13 @@ class Zuqiupipeline(object):
             month = str(data_game[1].strip())
             day = str(data_game[0])
         except Exception as e:
-            month = '01'
-            day = '01'
             logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -402,9 +406,13 @@ class Lanqiupipeline(object):
             month = str(data_game[1].strip())
             day = str(data_game[0])
         except Exception as e:
-            month = '01'
-            day = '01'
             logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -565,9 +573,13 @@ class Wangqiupipeline(object):
             month = str(data_game[1].strip())
             day = str(data_game[0])
         except Exception as e:
-            month = '01'
-            day = '01'
             logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -707,9 +719,13 @@ class Wqbodanpipeline(object):
             month = str(data_game[1].strip())
             day = str(data_game[0])
         except Exception as e:
-            month = '01'
-            day = '01'
             logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -817,9 +833,13 @@ class Bangqiupipeline(object):
             month = str(data_game[1].strip())
             day = str(data_game[0])
         except Exception as e:
-            month = '01'
-            day = '01'
             logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -1152,11 +1172,20 @@ class Roll_Zuqiupipeline(object):
     def process_item(self, item, spider):
         logger = logging.getLogger(__name__)
         # 比赛日期
-        data_game = item['data_game'].split("/")
-        month = str(data_game[1].strip())
-        day = str(data_game[0])
+        try:
+            data_game = item['data_game'].split("/")
+            month = str(data_game[1].strip())
+            day = str(data_game[0])
+        except Exception as e:
+            logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07', 'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
+        print(time_game)
         # 比赛时间,时间戳
         ctime = "2019" + "-" + month + "-" + day + "" + time_game + ":00"
         r_ctime = "2019" + "-" + month + "-" + day
@@ -1405,9 +1434,17 @@ class Roll_Lanqiupipeline(object):
         zhuangtai = item['zhuangtai']
         # 日期
         # data_game = item['data_game']
-        data_game = item['data_game'].split("/")
-        month = str(data_game[1].strip())
-        day = str(data_game[0])
+        try:
+            data_game = item['data_game'].split("/")
+            month = str(data_game[1].strip())
+            day = str(data_game[0])
+        except Exception as e:
+            logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07', 'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -1549,6 +1586,7 @@ class Roll_Wangqiupipeline(object):
         self.cursor = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
 
     def process_item(self, item, spider):
+        logger = logging.getLogger(__name__)
         # 联赛id
         league_id = item['league_id']
         # 联赛名
@@ -1566,9 +1604,17 @@ class Roll_Wangqiupipeline(object):
         zhuangtai = item['zhuangtai']
         # 日期
         # data_game = item['data_game']
-        data_game = item['data_game'].split("/")
-        month = str(data_game[1].strip())
-        day = str(data_game[0])
+        try:
+            data_game = item['data_game'].split("/")
+            month = str(data_game[1].strip())
+            day = str(data_game[0])
+        except Exception as e:
+            logger.warning(e)
+            data_game = item['data_game'].split(" ")
+            months = str(data_game[1].strip())
+            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07', 'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+            month = month_dict[months]
+            day = str(data_game[0])
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
@@ -1878,7 +1924,6 @@ class Zujieshuqiupipeline(object):
     def open_spider(self, spider):
         self.conn = psycopg2.connect(host=settings["POST_HOST"], port=settings['POST_PORT'], user=settings["POST_USER"], password=settings["POST_PASSWORD"], database=settings["POST_DATABASE"])
         self.cursor = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
-
     def process_item(self, item, spider):
         logger = logging.getLogger(__name__)
         ctime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
@@ -1894,6 +1939,40 @@ class Zujieshuqiupipeline(object):
             self.cursor.execute("update st_zq_result set status=2 where match_id={}".format(match_id))
             # self.cursor.execute("update st_zq_result_record set status=2  where match_id={}".format(match_id))
             self.cursor.execute("update st_zq_competition set status=2 where match_id={}".format(match_id))
+            # url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
+            # pass
+            # data = {
+            #     "game_code": "zq",
+            #     "title": "match_result",
+            #     "data": {
+            #         "lg_id": 27686,
+            #         "home_team": " ",
+            #         "guest_team": " ",
+            #         "home_rate": " ",
+            #         "guest_rate": " ",
+            #         "home_score": " ",
+            #         "guest_score": " ",
+            #         "all_goal": " ",
+            #         "status": "2",
+            #         "first_score": " ",
+            #         "last_score": " ",
+            #         "match_score": " ",
+            #         "match_winer": " ",
+            #         "match_time": " ",
+            #         "match_process": " ",
+            #         "tag": "111",
+            #         "match_id": match_id,
+            #         "u_home_score": "111",
+            #         "u_guest_score": "11",
+            #         "update_time": ctime,
+            #         "p_code": "111",
+            #         "source": "hg3535",
+            #     }
+            # }
+            # data = json.dumps(data)
+            # print(data)
+            # r = requests.post(url, data=data)
+            # print(r.content)
         except Exception as e:
             logger.warning('足球 赛事结束 结果插入错误')
             logger.warning(e)

+ 3 - 3
hg3535/settings.py

@@ -119,7 +119,7 @@ REACTOR_THREADPOOL_MAXSIZE = 40
 # LOG_LEVEL = 'INFO'
 COOKIES_ENABLED = False
 RETRY_ENABLED = False
-DOWNLOAD_TIMEOUT = 2
+DOWNLOAD_TIMEOUT = 1
 REDIRECT_ENABLED = False
 
 
@@ -130,7 +130,7 @@ SCHEDULER_FLUSH_ON_START = False
 # RETRY_TIMES = 2
 # RETRY_HTTP_CODES = [500, 502, 503, 504, 400, 408]
 
-LOG_LEVEL = 'DEBUG'
+# LOG_LEVEL = 'DEBUG'
 # SCHEDULER_PERSIST = False
 # LOG_FILE = './log/'
 
@@ -164,7 +164,7 @@ POST_PASSWORD = 'yjkj8888'
 R_HOST = 'localhost'
 R_POST = '6379'
 # R_PASSWORD = '123456'
-
+#
 # POST_HOST = 'localhost'
 # POST_DATABASE = 'kaiyou'
 # POST_USER = 'kaiyou'

BIN
hg3535/spiders/__pycache__/bq_jieshu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/lq_jieshu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/roll_bangqiu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/roll_lanqiu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/roll_wangqiu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/roll_zuqiu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/wangqiu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/wq_jieshu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/zq_jieshu.cpython-36.pyc


BIN
hg3535/spiders/__pycache__/zuqiu.cpython-36.pyc


+ 3 - 2
hg3535/spiders/bq_jieshu.py

@@ -28,7 +28,8 @@ class HgjieshuSpider(scrapy.Spider):
             # 所有比赛队名
             # tema_name = [i.extract() for i in tema]
             # 获得所有比分对象
-            tema_score = response.xpath('//div[contains(@class,"rt-ft")]')
+            # tema_score = response.xpath('//div[contains(@class,"rt-ft")]')
+            tema_score = response.xpath('//div[@class="flex-wrap"]/../div[5]')
             # 获得所有比赛id对象
             tema_id = response.xpath('//div[@class="flex-wrap"]/../div[1]/@id')
             # str.replace()
@@ -51,7 +52,7 @@ class HgjieshuSpider(scrapy.Spider):
             print(len(temaid_list))
             print(len(temascore_list))
             # 赛事id,赛事比元组列表
-            tema_tupe = [(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))]
+            tema_tupe = {(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))}
             print(tema_tupe)
             print(len(tema_tupe))
             for y in tema_tupe:

+ 5 - 3
hg3535/spiders/lq_jieshu.py

@@ -28,7 +28,9 @@ class HgjieshuSpider(scrapy.Spider):
             # 所有比赛队名
             # tema_name = [i.extract() for i in tema]
             # 获得所有比分对象
-            tema_score = response.xpath('//div[contains(@class,"rt-qft")]')
+            # tema_score = response.xpath('//div[contains(@class,"rt-qft")]')
+            tema_score = response.xpath('//div[@class="flex-wrap"]/../div[5]')
+            # print(tema_score)
             # 获得所有比赛id对象
             tema_id = response.xpath('//div[@class="flex-wrap"]/../div[1]/@id')
             # str.replace()
@@ -51,8 +53,8 @@ class HgjieshuSpider(scrapy.Spider):
             # print(len(temaid_list))
             # print(len(temascore_list))
             # 赛事id,赛事比元组列表
-            tema_tupe = [(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))]
-            # print(tema_tupe)
+            tema_tupe = {(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))}
+            print(tema_tupe)
             # print(len(tema_tupe))
             for y in tema_tupe:
                 if y[1]:

+ 2 - 2
hg3535/spiders/roll_zuqiu.py

@@ -18,8 +18,8 @@ class ZuqiuSpider(scrapy.Spider):
         "ITEM_PIPELINES":{
             'hg3535.pipelines.Roll_Zuqiupipeline': 100,
         },
-        'LOG_LEVEL': 'DEBUG',
-        'LOG_FILE': "../hg3535/log/roll_zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month,to_day.day)
+        # 'LOG_LEVEL': 'DEBUG',
+        # 'LOG_FILE': "../hg3535/log/roll_zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month,to_day.day)
     }
     start_urls = ['https://hg3535z.com/odds2/d/getodds?sid=1&pt=4&ubt=am&pn=0&sb=2&dc=null&pid=0'] # 滚球菜单 足球滚球列url
 

+ 3 - 2
hg3535/spiders/wq_jieshu.py

@@ -28,7 +28,8 @@ class HgjieshuSpider(scrapy.Spider):
             # 所有比赛队名
             # tema_name = [i.extract() for i in tema]
             # 获得所有比分对象
-            tema_score = response.xpath('//div[contains(@class,"rt-set")]')
+            # tema_score = response.xpath('//div[contains(@class,"rt-set")]')
+            tema_score = response.xpath('//div[@class="flex-wrap"]/../div[5]')
             # 获得所有比赛id对象
             tema_id = response.xpath('//div[@class="flex-wrap"]/../div[1]/@id')
             # str.replace()
@@ -51,7 +52,7 @@ class HgjieshuSpider(scrapy.Spider):
             # print(len(temaid_list))
             # print(len(temascore_list))
             # 赛事id,赛事比元组列表
-            tema_tupe = [(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))]
+            tema_tupe = {(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))}
             # print(tema_tupe)
             # print(len(tema_tupe))
             for y in tema_tupe:

+ 7 - 4
hg3535/spiders/zq_jieshu.py

@@ -16,8 +16,8 @@ class HgjieshuSpider(scrapy.Spider):
         "ITEM_PIPELINES":{
             'hg3535.pipelines.Zujieshuqiupipeline': 300,
         },
-        'LOG_LEVEL': 'DEBUG',
-        'LOG_FILE': "../hg3535/log/zq_jieshu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
+        # 'LOG_LEVEL': 'DEBUG',
+        # 'LOG_FILE': "../hg3535/log/zq_jieshu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
     start_urls = ['https://hg3535z.com/zh-cn/info-centre/sportsbook-info/results/1/normal/1']
 
@@ -29,7 +29,9 @@ class HgjieshuSpider(scrapy.Spider):
             # 所有比赛队名
             # tema_name = [i.extract() for i in tema]
             # 获得所有比分对象
-            tema_score = response.xpath('//div[contains(@class,"rt-ft")]')
+            # tema_score = response.xpath('//div[contains(@class,"rt-ft ")]')
+            tema_score = response.xpath('//div[@class="flex-wrap"]/../div[5]')
+            # print(tema_score)
             # 获得所有比赛id对象
             tema_id = response.xpath('//div[@class="flex-wrap"]/../div[1]/@id')
             # str.replace()
@@ -52,7 +54,8 @@ class HgjieshuSpider(scrapy.Spider):
             # print(len(temaid_list))
             # print(len(temascore_list))
             # 赛事id,赛事比元组列表
-            tema_tupe = [(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))]
+            tema_tupe = {(temaid_list[i], temascore_list[i]) for i in range(len(temaid_list))}
+            print(tema_tupe)
             # print(tema_tupe)
             # print(len(tema_tupe))
 

+ 485 - 477
hg3535/spiders/zuqiu.py

@@ -20,8 +20,14 @@ class ZuqiuSpider(scrapy.Spider):
             'hg3535.pipelines.Zuqiupipeline': 300,
         },
         'LOG_LEVEL': 'DEBUG',
-        'LOG_FILE': "../hg3535/log/zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
+        'LOG_FILE': "../hg3535/log/zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day),
+        # 'RETRY_ENABLED': False,
+        # 'COOKIES_ENABLED': False,
+        # 'DOWNLOAD_TIMEOUT': 1,
+        # 'SCHEDULER_PERSIST': False,
+        # 'SCHEDULER_FLUSH_ON_START': False,
     }
+
     def start_requests(self):
 
         for y in range(1, 4):
@@ -32,488 +38,490 @@ class ZuqiuSpider(scrapy.Spider):
                 # yield scrapy.Request(url=url, callback=self.parse, meta={'pt': y})
 
     def parse(self, response):
-        if response.text:
+        if response.status == 200:
+            if response.text:
+                try:
+                    datas = json.loads(response.text).get('n-ot', "").get('egs', "")
+                except:
+                    datas = ""
+                pt = copy.copy(response.meta['pt'])
+                if datas:
+                    for result in datas:
+                        new_results = result['es']
+                        for new_result in new_results:
+                            game_id = str(new_result['i'][16])
+                            if pt is 3:
+                                url = "https://hg3535z.com/odds2/d/getamodds?eid="+game_id+"&iip=false&ubt=am&isp=true"
+                                yield Request(url=url, callback=self.parse_each, meta={'pt': pt})
+                                # yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
+                            if pt is 2:
+                                url = "https://hg3535z.com/odds2/d/getamodds?eid="+game_id+"&iip=false&ubt=am&isp=false"
+                                yield Request(url=url, callback=self.parse_each, meta={'pt': pt})
+                                # yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
+                            if pt is 1:
+                                url = "https://hg3535z.com/odds2/d/getamodds?eid="+game_id+"&iip=false&ubt=am&isp=false"
+                                yield Request(url=url, callback=self.parse_each, meta={'pt': pt})
+                                # yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
+
+    def parse_each(self, response):
+        if response.status == 200:
+            # 球队进球数 大小
             try:
-                datas = json.loads(response.text).get('n-ot', "").get('egs', "")
+                datas = json.loads(response.text)['eg']['es']
+                league_id = json.loads(response.text)['eg']['c']['k']
+                # 联赛名
+                league_name = json.loads(response.text)['eg']['c']['n']
+                zuqiu = json.loads(response.text)['i'][31]
             except:
                 datas = ""
-            pt = copy.copy(response.meta['pt'])
+                league_id = ""
+                # 联赛名
+                league_name = ""
+                zuqiu = ""
+            try:
+                pt = response.meta['pt']
+            except:
+                pt = 0
             if datas:
-                for result in datas:
-                    new_results = result['es']
-                    for new_result in new_results:
-                        game_id = str(new_result['i'][16])
-                        if pt is 3:
-                            url = "https://hg3535z.com/odds2/d/getamodds?eid="+game_id+"&iip=false&ubt=am&isp=true"
-                            yield Request(url=url, callback=self.parse_each, meta={'pt': pt})
-                            # yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
-                        if pt is 2:
-                            url = "https://hg3535z.com/odds2/d/getamodds?eid="+game_id+"&iip=false&ubt=am&isp=false"
-                            yield Request(url=url, callback=self.parse_each, meta={'pt': pt})
-                            # yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
-                        if pt is 1:
-                            url = "https://hg3535z.com/odds2/d/getamodds?eid="+game_id+"&iip=false&ubt=am&isp=false"
-                            yield Request(url=url, callback=self.parse_each, meta={'pt': pt})
-                            # yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
-
-    def parse_each(self, response):
-        # 球队进球数 大小
-        try:
-            datas = json.loads(response.text)['eg']['es']
-            league_id = json.loads(response.text)['eg']['c']['k']
-            # 联赛名
-            league_name = json.loads(response.text)['eg']['c']['n']
-            zuqiu = json.loads(response.text)['i'][31]
-        except:
-            datas = ""
-            league_id = ""
-            # 联赛名
-            league_name = ""
-            zuqiu = ""
-        try:
-            pt = response.meta['pt']
-        except:
-            pt = 0
-        if datas:
-            item = Zuqiu()
-            full_dict = {}
-            half_dict = {}
-            full_dict_rule = {}
-            half_dict_rule = {}
-            for data in datas:
-                try:
-                    new_data = data['pci']['ctid']
-                except:
-                    new_data = ""
-                if new_data == 0:
-                    # 比赛id
-                    game_id = str(data['k'])
-                    # 球队1
-                    team_home = data['i'][0]
-                    # 球队2
-                    team_guest = data['i'][1]
-                    # 数量(97>)
-                    number = data['i'][2]
-                    # 下半场
-                    half_way = data['i'][12]
-                    # 角球或者其他
-                    corner_ball = data['pci'].get('ctn', "")
-                    # 日期
-                    data_game = data['i'][4]
-                    # 开赛时间
-                    time_game = data['i'][5]
-
-# 让球------------------------------------------------------------------------------------------------------------------
-                    try:
-                        concedes = data['o']['ah']['v']
-                        new_concedes = [concedes[i] for i in range(len(concedes)) if i % 2 is 1]
-                        concede_homes = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 is 0]
-                        concede_home_rule = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 is 0]
-                        # concede_home
-                        concede_guests = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 is 1]
-                        # concede_guest_rule
-                        concede_guest_rule = [concede_guests[i] for i in range(len(concede_guests)) if
-                                              i % 2 == 0]
-                        if pt is 3:
-                            concede_guest = [round(float(concede_guests[i]) -1, 2) for i in range(len(concede_guests)) if i % 2 is 1]
-                            concede_home = [round(float(concede_homes[i]) - 1, 2) for i in range(len(concede_homes)) if i % 2 is 1]
-                        else:
-                            concede_guest = [concede_guests[i] for i in range(len(concede_guests)) if i % 2 is 1]
-                            concede_home = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 is 1]
-                    except:
-                        concede_guest = ""
-                        concede_guest_rule = ""
-                        concede_home = ""
-                        concede_home_rule = ""
-
-# 上半场让球half_concede-------------------------------------------------------------------------------------------------
-                    try:
-                        half_concedes = data['o']['ah1st']['v']
-                        new_half_concedes = [half_concedes[i] for i in range(len(half_concedes)) if i % 2 is 1]
-                        new_half_concede_homes = [new_half_concedes[i] for i in range(len(new_half_concedes)) if i % 2 == 0]
-                        # half_concede_home_rule
-                        half_concede_home_rule = [new_half_concede_homes[i] for i in
-                                                  range(len(new_half_concede_homes)) if i % 2 == 0]
-                        # concede_home
-                        half_concede_guests = [new_half_concedes[i] for i in range(len(new_half_concedes)) if i % 2 is 1]
-                        # concede_guest_rule
-                        half_concede_guest_rule = [half_concede_guests[i] for i in
-                                                   range(len(half_concede_guests)) if i % 2 == 0]
-                        if pt is 3:
-                            half_concede_home = [round(float(new_half_concede_homes[i]) - 1, 2) for i in range(len(new_half_concede_homes)) if i % 2 is 1]
-                            half_concede_guest = [round(float(half_concede_guests[i]) - 1, 2) for i in range(len(half_concede_guests)) if i % 2 is 1]
-                        else:
-                            half_concede_home = [new_half_concede_homes[i] for i in range(len(new_half_concede_homes)) if i % 2 is 1]
-                            half_concede_guest = [half_concede_guests[i] for i in range(len(half_concede_guests)) if i % 2 is 1]
-                    except:
-                        half_concede_home_rule = ""
-                        half_concede_home = ""
-                        half_concede_guest_rule = ""
-                        half_concede_guest = ""
-# 全场大小size 进球大小---------------------------------------------------------------------------------------------------
-                    try:
-                        sizes = data['o']['ou']['v']
-                        new_sizes = [sizes[i] for i in range(len(sizes)) if i % 2 is 1]
-                        size_homes = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 0]
-                        # size_home_rule
-                        size_home_rule = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 0]
-                        # size_home
-                        size_guests = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 1]
-                        # size_guest_rule
-                        size_guest_rule = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 0]
-                        # csize_guest
-                        if pt is 3:
-                            size_guest = [round(float(size_guests[i]) - 1, 2) for i in range(len(size_guests)) if i % 2 is 1]
-                            size_home = [round(float(size_homes[i]) - 1, 2) for i in range(len(size_homes)) if i % 2 is 1]
-                        else:
-                            size_guest = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 1]
-                            size_home = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 1]
-                    except:
-                        size_guest = ""
-                        size_guest_rule = ""
-                        size_home = ""
-                        size_home_rule = ""
-
-# 上半场大小 进球大小 half_size-------------------------------------------------------------------------------------------
-                    try:
-                        half_sizes = data['o']['ou1st']['v']
-                        new_half_sizes = [half_sizes[i] for i in range(len(half_sizes)) if i % 2 is 1]
-                        half_size_homes = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 0]
-                        # size_home_rule
-                        half_size_home_rule = [half_size_homes[i] for i in range(len(half_size_homes)) if
-                                               i % 2 is 0]
-
-                        half_size_guests = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 1]
-                        # half_size_guest_rule 客队
-                        half_size_guest_rule = [half_size_guests[i] for i in range(len(half_size_guests)) if
-                                                i % 2 is 0]
-                        # half_size_guest
-                        if pt is 3:
-                            half_size_guest = [round(float(half_size_guests[i]) - 1, 2) for i in range(len(half_size_guests)) if
-                                               i % 2 is 1]
-                            half_size_home = [round(float(half_size_homes[i]) - 1, 2) for i in range(len(half_size_homes)) if
-                                              i % 2 is 1]
-                        else:
-                            half_size_guest = [half_size_guests[i] for i in range(len(half_size_guests)) if
-                                               i % 2 is 1]
-                            half_size_home = [half_size_homes[i] for i in range(len(half_size_homes)) if i % 2 is 1]
-                    except:
-                        half_size_guest = ""
-                        half_size_guest_rule = ""
-                        half_size_home = ""
-                        half_size_home_rule = ""
-
-# 全场总进球 total_goal--------------------------------------------------------------------------------------------------
-                    total_goal = {}
-                    try:
-                        total_goals = data['o']['tg']['v']
-                        new_total_goals = [total_goals[i] for i in range(len(total_goals)) if i % 2 is 1]
-                        total_goal["total_goal_zero"] = round(float(new_total_goals[0]) - 1, 2)
-                        total_goal["total_goal_two"] = round(float(new_total_goals[1]) - 1, 2)
-                        total_goal["total_goal_four"] = round(float(new_total_goals[2]) - 1, 2)
-                        total_goal["total_goal_seven"] = round(float(new_total_goals[3]) - 1, 2)
-                    except:
-                        total_goal["total_goal_zero"] = ""
-                        total_goal["total_goal_two"] = ""
-                        total_goal["total_goal_four"] = ""
-                        total_goal["total_goal_seven"] = ""
-
-# 总进球上半场 half_total_goal-------------------------------------------------------------------------------------------
-                    try:
-                        half_total_goals = data['o']['tg1st']['v']
-                        new_half_total_goals = [half_total_goals[i] for i in range(len(half_total_goals)) if i % 2 is 1]
-                        total_goal["half_total_goal_zero"] = round(float(new_half_total_goals[0]) - 1, 2)
-                        total_goal["half_total_goal_one"] = round(float(new_half_total_goals[1]) - 1, 2)
-                        total_goal["half_total_goal_two"] = round(float(new_half_total_goals[2]) - 1, 2)
-                        total_goal["half_total_goal_three"] = round(float(new_half_total_goals[3]) - 1, 2)
-                    except:
-                        total_goal["half_total_goal_zero"] = ""
-                        total_goal["half_total_goal_one"] = ""
-                        total_goal["half_total_goal_two"] = ""
-                        total_goal["half_total_goal_three"] = ""
-
-# 早盘 半场/全场---------------------------------------------------------------------------------------------------------
-                    half_full = {}
-                    new_lists = ["half_full_home_home", "half_full_home_dogfall", "half_full_home_guest",
-                                 "half_full_dogfall_home", "half_full_dogfall_dogfall", "half_full_dogfall_guest",
-                                 "half_full_guest_home", "half_full_guest_dogfall", "half_full_guest_guest"]
-                    # 早盘 半场/全场
-                    try:
-                        half_fulls = data['o']['hf']['v']
-                        new_half_fulls = [half_fulls[i] for i in range(len(half_fulls)) if i % 2 is 1]
-                        for index, value in enumerate(new_lists):
-                            half_full[value] = round(float(new_half_fulls[index]) - 1, 2)
-                    except:
-                        for index, value in enumerate(new_lists):
-                            half_full[value] = ""
-
-# 早盘 最先/最后进球 最先进球 ---------------------------------------------------------------------------------------------
-                    first_last_ball = {}
-                    try:
-                        first_balls = data['o']['ttslast']['v']
-                        first_ball = [first_balls[i] for i in range(len(first_balls)) if i % 2 is 1]
-                        first_last_ball['first_ball_home'] = round(float(first_ball[0]) - 1, 2)
-                        first_last_ball['first_ball_guest'] = round(float(first_ball[1]) - 1, 2)
-                    except:
-                        pass
-
-                    # 早盘 最先/最后进球 最后进球
-
-                    try:
-                        last_balls = data['o']['tts1st']['v']
-                        last_ball = [last_balls[i] for i in range(len(last_balls)) if i % 2 is 1]
-                        first_last_ball['last_ball_home'] = round(float(last_ball[0]) - 1, 2)
-                        first_last_ball['last_ball_guest'] = round(float(last_ball[1]) - 1, 2)
-                        first_last_ball['not_ball'] = round(float(last_ball[2]) - 1, 2)
-                    except:
-                        pass
-
-# 全场独赢capot ---------------------------------------------------------------------------------------------------------
-
-                    try:
-                        capots = data['o']['1x2']['v']
-                        new_capots = [capots[i] for i in range(len(capots)) if i % 2 is 1]
-                        capot_home = round(float(new_capots[0]) - 1, 2)
-                        capot_guest = round(float(new_capots[1]) - 1, 2)
-                        capot_dogfall = round(float(new_capots[2]) - 1, 2)
-                    except:
-                        capot_home = ""
-                        capot_guest = ""
-                        capot_dogfall = ""
-
-                    # 上半场独赢capot
-                    try:
-                        half_capots = data['o']['1x21st']['v']
-                        new_half_capots = [half_capots[i] for i in range(len(half_capots)) if i % 2 is 1]
-                        half_capot_home = round(float(new_half_capots[0]) - 1, 2)
-                        half_capot_guest = round(float(new_half_capots[1]) - 1, 2)
-                        half_capot_dogfall = round(float(new_half_capots[2]) - 1, 2)
-                    except:
-                        half_capot_home = ""
-                        half_capot_guest = ""
-                        half_capot_dogfall = ""
-
-# 全场入球:单/双 odd_even------------------------------------------------------------------------------------------------
-                    try:
-                        odd_evens = data['o']['oe']['v']
-                        new_odd_evens = [odd_evens[i] for i in range(len(odd_evens)) if i % 2 is 1]
-                        if pt is 3:
-                            odd_even_odd = round(float(new_odd_evens[0]) - 1, 2)
-                            odd_even_even = round(float(new_odd_evens[1]) - 1, 2)
-                        else:
-                            odd_even_odd = round(float(new_odd_evens[0]), 2)
-                            odd_even_even = round(float(new_odd_evens[1]), 2)
-                    except:
-                        odd_even_odd = ""
-                        odd_even_even = ""
-                    # 半场入球:单/双 half_odd_even
-                    try:
-                        half_odd_evens = data['o']['oe1st']['v']
-                        new_half_odd_evens = [half_odd_evens[i] for i in range(len(half_odd_evens)) if i % 2 is 1]
-                        if pt is 3:
-                            half_odd_even_odd = round(float(new_half_odd_evens[0]) - 1, 2)
-                            half_odd_even_even = round(float(new_half_odd_evens[1]) - 1, 2)
-                        else:
-                            half_odd_even_odd = new_half_odd_evens[0]
-                            half_odd_even_even = new_half_odd_evens[1]
-                    except:
-                        half_odd_even_odd = ""
-                        half_odd_even_even = ""
-
-                    bodan_data = {}
-# 波胆------------------------------------------------------------------------------------------------------------------
-                    try:
-                        bodans = data['o']['cs']['v']
-                        one_list = ["bodanhome_one_zero", "bodanhome_two_zero", "bodanhome_two_one",
-                                    "bodanhome_three_zero", "bodanhome_three_one", "bodanhome_three_two",
-                                    "bodanhome_four_zero", "bodanhome_four_one", "bodanhome_four_two",
-                                    "bodanhome_four_three"]
-                        two_list = ["bodanguest_one_zero", "bodanguest_two_zero", "bodanguest_two_one",
-                                    "bodanguest_three_zero", "bodanguest_three_one", "bodanguest_three_two",
-                                    "bodanguest_four_zero", "bodanguest_four_one", "bodanguest_four_two",
-                                    "bodanguest_four_three"]
-                        three_list = ["bodandogfall_zero_zero", "bodandogfall_one_one", "bodandogfall_two_two",
-                                      "bodandogfall_three_three", "bodandogfall_four_four"]
-                        new_bodans = [bodans[i] for i in range(len(bodans)) if i % 2 is 1]
-                        new_bodan = new_bodans[0:20]
-                        # 主队bodan_home
-                        bodan_home = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 0]
-                        for index, t in enumerate(one_list):
-                            bodan_data[t] = round(float(bodan_home[index]) - 1, 2)
-                        # 客队bodan_guest
-                        bodan_guest = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 1]
-                        for y, z in enumerate(two_list):
-                            bodan_data[z] = round(float(bodan_guest[y]) - 1, 2)
-                        bodan_dogfall = new_bodans[-7:-2]
-                        for a, b in enumerate(three_list):
-                            bodan_data[b] = round(float(bodan_dogfall[a]) - 1, 2)
-                        # 其他bodan_other
-                        bodan_data['bodanother'] = round(float(new_bodans[-1]) - 1, 2)
-                    except:
-                        pass
-
-                    try:
-                        half_bodans = data['o']['cs1st']['v']
-                        new_half_bodans = [half_bodans[i] for i in range(len(half_bodans)) if i % 2 is 1]
-                        new_one = ["halfbodanhome_one_zero", "halfbodanhome_two_zero", "halfbodanhome_two_one",
-                                   "halfbodanhome_three_zero", "halfbodanhome_three_one", "halfbodanhome_three_two"]
-                        new_two = ["halfbodanguest_one_zero", "halfbodanguest_two_zero", "halfbodanguest_two_one",
-                                   "halfbodanguest_three_zero", "halfbodanguest_three_one", "halfbodanguest_three_two"]
-                        new_three = ["halfbodandogfall_zero_zero", "halfbodandogfall_one_one",
-                                     "halfbodandogfall_two_two",
-                                     "halfbodandogfall_three_three"]
-                        halfbodan = new_half_bodans[0:12]
-                        half_bodan_home = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 0]
-                        # 队1
-                        for index, t in enumerate(new_one):
-                            bodan_data[t] = round(float(half_bodan_home[index]) - 1, 2)
-                        # 队2
-                        half_bodan_guest = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 1]
-                        for y, z in enumerate(new_two):
-                            bodan_data[z] = round(float(half_bodan_guest[y]) - 1, 2)
-                        # 和/平
-                        half_bodan_dogfall = new_half_bodans[-6:-2]
-                        for a, b in enumerate(new_three):
-                            bodan_data[b] = round(float(half_bodan_dogfall[a]) - 1, 2)
-                        # 其他
-                        bodan_data['halfbodanother'] = round(float(new_half_bodans[-1]) - 1, 2)
-                    except:
-                        pass
-                if new_data is 12:
-                    try:
-                        home_data = data['o']['ou']['v']
-                        # 球队进球 大条件
-                        full_dict_rule['home_size_big'] = home_data[1]
-                        # 球队进球小条件
-                        full_dict_rule['home_size_small'] = home_data[3]
-
-                        if pt is 3:
-                            # 球队进球大赔率
-                            full_dict['home_size_big'] = round(float(home_data[5]) - 1, 2)
-                            # 球队进球小赔率
-                            full_dict['home_size_small'] = round(float(home_data[7]) - 1, 2)
-                        else:
-                            # 球队进球大赔率
-                            full_dict['home_size_big'] = home_data[5]
-                            # 球队进球小赔率
-                            full_dict['home_size_small'] = home_data[7]
-                    except:
-                        full_dict['home_size_small'] = ""
-                        full_dict_rule['home_size_small'] = ""
-                        full_dict['home_size_big'] = ""
-                        full_dict_rule['home_size_big'] = ""
-                    try:
-                        half_home_data = data['o']['ou1st']['v']
-                        half_dict_rule['half_home_size_big'] = half_home_data[1]
-                        half_dict_rule['half_home_size_small'] = half_home_data[3]
-
-                        if pt is 3:
-                            half_dict['half_home_size_big'] = round(float(half_home_data[5]) - 1, 2)
-                            half_dict['half_home_size_small'] = round(float(half_home_data[7]) - 1, 2)
-                        else:
-                            half_home_size_big = half_home_data[5]
-                            half_dict['half_home_size_big'] = half_home_size_big
-                            half_home_size_small = half_home_data[7]
-                            half_dict['half_home_size_small'] = half_home_size_small
-
-                    except:
-                        half_dict_rule['half_home_size_big'] = ""
-                        half_dict['half_home_size_big'] = ""
-                        half_dict_rule['half_home_size_small'] = ""
-                        half_dict['half_home_size_small'] = ""
-
-                if new_data is 13:
-                    try:
-                        guest_data = data['o']['ou']['v']
-                        full_dict_rule['guest_size_big'] = guest_data[1]
-                        full_dict_rule['guest_size_small'] = guest_data[3]
-
-                        if pt is 3:
-                            full_dict['guest_size_big'] = round(float(guest_data[5]) - 1, 2)
-                            full_dict['guest_size_small'] = round(float(guest_data[7]) - 1, 2)
-                        else:
-                            full_dict['guest_size_big'] = guest_data[5]
-                            full_dict['guest_size_small'] = guest_data[7]
-                    except:
-                        full_dict_rule['guest_size_big'] = ""
-                        full_dict['guest_size_big'] = ""
-                        full_dict_rule['guest_size_small'] = ""
-                        full_dict['guest_size_small'] = ''
+                item = Zuqiu()
+                full_dict = {}
+                half_dict = {}
+                full_dict_rule = {}
+                half_dict_rule = {}
+                for data in datas:
                     try:
-                        half_guest_data = data['o']['ou1st']['v']
-                        half_dict_rule['half_guest_size_big'] = half_guest_data[1]
-                        half_dict_rule['half_guest_size_small'] = half_guest_data[3]
-                        if pt is 3:
-                            half_dict['half_guest_size_big'] = round(float(half_guest_data[5]) - 1, 2)
-                            half_dict['half_guest_size_small'] = round(float(half_guest_data[7]) - 1, 2)
-                        else:
-                            half_dict['half_guest_size_big'] = half_guest_data[5]
-                            half_dict['half_guest_size_small'] = half_guest_data[7]
+                        new_data = data['pci']['ctid']
                     except:
-                        half_dict_rule['half_guest_size_big'] = ""
-                        half_dict['half_guest_size_big'] = ""
-
-                        half_dict_rule['half_guest_size_small'] = ""
-                        half_dict['half_guest_size_small'] = ""
-
-            item['league_id'] = league_id
-            item['league_name'] = league_name
-            item['pt'] = pt
-            item['game_id'] = game_id
-            item['team_home'] = team_home
-            item['team_guest'] = team_guest
-            item['number'] = number
-            item['data_game'] = data_game
-            item['time_game'] = time_game
-            item['corner_ball'] = corner_ball
-            # 波胆
-            item['bodan_data'] = bodan_data
-            # 早盘入球数单双
-            item["odd_even_odd"] = odd_even_odd
-            item["odd_even_even"] = odd_even_even
-            item["half_odd_even_odd"] = half_odd_even_odd
-            item["half_odd_even_even"] = half_odd_even_even
-
-            item['total_goal'] = total_goal
-
-            item["half_capot_home"] = half_capot_home
-            item["half_capot_guest"] = half_capot_guest
-            item["half_capot_dogfall"] = half_capot_dogfall
-
-            item["capot_home"] = capot_home
-            item["capot_guest"] = capot_guest
-            item["capot_dogfall"] = capot_dogfall
-
-            item["first_last_ball"] = first_last_ball
-
-            item["half_full"] = half_full
-
-            item["half_size_guest"] = half_size_guest
-            item["half_size_guest_rule"] = half_size_guest_rule
-            item["half_size_home"] = half_size_home
-            item["half_size_home_rule"] = half_size_home_rule
-            # 全场大小
-            item["size_guest"] = size_guest
-            item["size_guest_rule"] = size_guest_rule
-            item["size_home"] = size_home
-            item["size_home_rule"] = size_home_rule
-            # 上半场让球
-            item["half_concede_home_rule"] = half_concede_home_rule
-            item["half_concede_home"] = half_concede_home
-            item["half_concede_guest_rule"] = half_concede_guest_rule
-            item["half_concede_guest"] = half_concede_guest
-            # 全场让球
-            item["concede_guest"] = concede_guest
-            item["concede_guest_rule"] = concede_guest_rule
-            item["concede_home"] = concede_home
-            item["concede_home_rule"] = concede_home_rule
-
-            item['full_data'] = full_dict
-            item['half_data'] = half_dict
-            item['full_data_rule'] = full_dict_rule
-            item['half_data_rule'] = half_dict_rule
-            item['zuqiu'] = zuqiu
-            yield item
+                        new_data = ""
+                    if new_data == 0:
+                        # 比赛id
+                        game_id = str(data['k'])
+                        # 球队1
+                        team_home = data['i'][0]
+                        # 球队2
+                        team_guest = data['i'][1]
+                        # 数量(97>)
+                        number = data['i'][2]
+                        # 下半场
+                        half_way = data['i'][12]
+                        # 角球或者其他
+                        corner_ball = data['pci'].get('ctn', "")
+                        # 日期
+                        data_game = data['i'][4]
+                        # 开赛时间
+                        time_game = data['i'][5]
+
+    # 让球------------------------------------------------------------------------------------------------------------------
+                        try:
+                            concedes = data['o']['ah']['v']
+                            new_concedes = [concedes[i] for i in range(len(concedes)) if i % 2 is 1]
+                            concede_homes = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 is 0]
+                            concede_home_rule = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 is 0]
+                            # concede_home
+                            concede_guests = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 is 1]
+                            # concede_guest_rule
+                            concede_guest_rule = [concede_guests[i] for i in range(len(concede_guests)) if
+                                                  i % 2 == 0]
+                            if pt is 3:
+                                concede_guest = [round(float(concede_guests[i]) -1, 2) for i in range(len(concede_guests)) if i % 2 is 1]
+                                concede_home = [round(float(concede_homes[i]) - 1, 2) for i in range(len(concede_homes)) if i % 2 is 1]
+                            else:
+                                concede_guest = [concede_guests[i] for i in range(len(concede_guests)) if i % 2 is 1]
+                                concede_home = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 is 1]
+                        except:
+                            concede_guest = ""
+                            concede_guest_rule = ""
+                            concede_home = ""
+                            concede_home_rule = ""
+
+    # 上半场让球half_concede-------------------------------------------------------------------------------------------------
+                        try:
+                            half_concedes = data['o']['ah1st']['v']
+                            new_half_concedes = [half_concedes[i] for i in range(len(half_concedes)) if i % 2 is 1]
+                            new_half_concede_homes = [new_half_concedes[i] for i in range(len(new_half_concedes)) if i % 2 == 0]
+                            # half_concede_home_rule
+                            half_concede_home_rule = [new_half_concede_homes[i] for i in
+                                                      range(len(new_half_concede_homes)) if i % 2 == 0]
+                            # concede_home
+                            half_concede_guests = [new_half_concedes[i] for i in range(len(new_half_concedes)) if i % 2 is 1]
+                            # concede_guest_rule
+                            half_concede_guest_rule = [half_concede_guests[i] for i in
+                                                       range(len(half_concede_guests)) if i % 2 == 0]
+                            if pt is 3:
+                                half_concede_home = [round(float(new_half_concede_homes[i]) - 1, 2) for i in range(len(new_half_concede_homes)) if i % 2 is 1]
+                                half_concede_guest = [round(float(half_concede_guests[i]) - 1, 2) for i in range(len(half_concede_guests)) if i % 2 is 1]
+                            else:
+                                half_concede_home = [new_half_concede_homes[i] for i in range(len(new_half_concede_homes)) if i % 2 is 1]
+                                half_concede_guest = [half_concede_guests[i] for i in range(len(half_concede_guests)) if i % 2 is 1]
+                        except:
+                            half_concede_home_rule = ""
+                            half_concede_home = ""
+                            half_concede_guest_rule = ""
+                            half_concede_guest = ""
+    # 全场大小size 进球大小---------------------------------------------------------------------------------------------------
+                        try:
+                            sizes = data['o']['ou']['v']
+                            new_sizes = [sizes[i] for i in range(len(sizes)) if i % 2 is 1]
+                            size_homes = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 0]
+                            # size_home_rule
+                            size_home_rule = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 0]
+                            # size_home
+                            size_guests = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 1]
+                            # size_guest_rule
+                            size_guest_rule = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 0]
+                            # csize_guest
+                            if pt is 3:
+                                size_guest = [round(float(size_guests[i]) - 1, 2) for i in range(len(size_guests)) if i % 2 is 1]
+                                size_home = [round(float(size_homes[i]) - 1, 2) for i in range(len(size_homes)) if i % 2 is 1]
+                            else:
+                                size_guest = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 1]
+                                size_home = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 1]
+                        except:
+                            size_guest = ""
+                            size_guest_rule = ""
+                            size_home = ""
+                            size_home_rule = ""
+
+    # 上半场大小 进球大小 half_size-------------------------------------------------------------------------------------------
+                        try:
+                            half_sizes = data['o']['ou1st']['v']
+                            new_half_sizes = [half_sizes[i] for i in range(len(half_sizes)) if i % 2 is 1]
+                            half_size_homes = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 0]
+                            # size_home_rule
+                            half_size_home_rule = [half_size_homes[i] for i in range(len(half_size_homes)) if
+                                                   i % 2 is 0]
+
+                            half_size_guests = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 1]
+                            # half_size_guest_rule 客队
+                            half_size_guest_rule = [half_size_guests[i] for i in range(len(half_size_guests)) if
+                                                    i % 2 is 0]
+                            # half_size_guest
+                            if pt is 3:
+                                half_size_guest = [round(float(half_size_guests[i]) - 1, 2) for i in range(len(half_size_guests)) if
+                                                   i % 2 is 1]
+                                half_size_home = [round(float(half_size_homes[i]) - 1, 2) for i in range(len(half_size_homes)) if
+                                                  i % 2 is 1]
+                            else:
+                                half_size_guest = [half_size_guests[i] for i in range(len(half_size_guests)) if
+                                                   i % 2 is 1]
+                                half_size_home = [half_size_homes[i] for i in range(len(half_size_homes)) if i % 2 is 1]
+                        except:
+                            half_size_guest = ""
+                            half_size_guest_rule = ""
+                            half_size_home = ""
+                            half_size_home_rule = ""
+
+    # 全场总进球 total_goal--------------------------------------------------------------------------------------------------
+                        total_goal = {}
+                        try:
+                            total_goals = data['o']['tg']['v']
+                            new_total_goals = [total_goals[i] for i in range(len(total_goals)) if i % 2 is 1]
+                            total_goal["total_goal_zero"] = round(float(new_total_goals[0]) - 1, 2)
+                            total_goal["total_goal_two"] = round(float(new_total_goals[1]) - 1, 2)
+                            total_goal["total_goal_four"] = round(float(new_total_goals[2]) - 1, 2)
+                            total_goal["total_goal_seven"] = round(float(new_total_goals[3]) - 1, 2)
+                        except:
+                            total_goal["total_goal_zero"] = ""
+                            total_goal["total_goal_two"] = ""
+                            total_goal["total_goal_four"] = ""
+                            total_goal["total_goal_seven"] = ""
+
+    # 总进球上半场 half_total_goal-------------------------------------------------------------------------------------------
+                        try:
+                            half_total_goals = data['o']['tg1st']['v']
+                            new_half_total_goals = [half_total_goals[i] for i in range(len(half_total_goals)) if i % 2 is 1]
+                            total_goal["half_total_goal_zero"] = round(float(new_half_total_goals[0]) - 1, 2)
+                            total_goal["half_total_goal_one"] = round(float(new_half_total_goals[1]) - 1, 2)
+                            total_goal["half_total_goal_two"] = round(float(new_half_total_goals[2]) - 1, 2)
+                            total_goal["half_total_goal_three"] = round(float(new_half_total_goals[3]) - 1, 2)
+                        except:
+                            total_goal["half_total_goal_zero"] = ""
+                            total_goal["half_total_goal_one"] = ""
+                            total_goal["half_total_goal_two"] = ""
+                            total_goal["half_total_goal_three"] = ""
+
+    # 早盘 半场/全场---------------------------------------------------------------------------------------------------------
+                        half_full = {}
+                        new_lists = ["half_full_home_home", "half_full_home_dogfall", "half_full_home_guest",
+                                     "half_full_dogfall_home", "half_full_dogfall_dogfall", "half_full_dogfall_guest",
+                                     "half_full_guest_home", "half_full_guest_dogfall", "half_full_guest_guest"]
+                        # 早盘 半场/全场
+                        try:
+                            half_fulls = data['o']['hf']['v']
+                            new_half_fulls = [half_fulls[i] for i in range(len(half_fulls)) if i % 2 is 1]
+                            for index, value in enumerate(new_lists):
+                                half_full[value] = round(float(new_half_fulls[index]) - 1, 2)
+                        except:
+                            for index, value in enumerate(new_lists):
+                                half_full[value] = ""
+
+    # 早盘 最先/最后进球 最先进球 ---------------------------------------------------------------------------------------------
+                        first_last_ball = {}
+                        try:
+                            first_balls = data['o']['ttslast']['v']
+                            first_ball = [first_balls[i] for i in range(len(first_balls)) if i % 2 is 1]
+                            first_last_ball['first_ball_home'] = round(float(first_ball[0]) - 1, 2)
+                            first_last_ball['first_ball_guest'] = round(float(first_ball[1]) - 1, 2)
+                        except:
+                            pass
+
+                        # 早盘 最先/最后进球 最后进球
+
+                        try:
+                            last_balls = data['o']['tts1st']['v']
+                            last_ball = [last_balls[i] for i in range(len(last_balls)) if i % 2 is 1]
+                            first_last_ball['last_ball_home'] = round(float(last_ball[0]) - 1, 2)
+                            first_last_ball['last_ball_guest'] = round(float(last_ball[1]) - 1, 2)
+                            first_last_ball['not_ball'] = round(float(last_ball[2]) - 1, 2)
+                        except:
+                            pass
+
+    # 全场独赢capot ---------------------------------------------------------------------------------------------------------
+
+                        try:
+                            capots = data['o']['1x2']['v']
+                            new_capots = [capots[i] for i in range(len(capots)) if i % 2 is 1]
+                            capot_home = round(float(new_capots[0]) - 1, 2)
+                            capot_guest = round(float(new_capots[1]) - 1, 2)
+                            capot_dogfall = round(float(new_capots[2]) - 1, 2)
+                        except:
+                            capot_home = ""
+                            capot_guest = ""
+                            capot_dogfall = ""
+
+                        # 上半场独赢capot
+                        try:
+                            half_capots = data['o']['1x21st']['v']
+                            new_half_capots = [half_capots[i] for i in range(len(half_capots)) if i % 2 is 1]
+                            half_capot_home = round(float(new_half_capots[0]) - 1, 2)
+                            half_capot_guest = round(float(new_half_capots[1]) - 1, 2)
+                            half_capot_dogfall = round(float(new_half_capots[2]) - 1, 2)
+                        except:
+                            half_capot_home = ""
+                            half_capot_guest = ""
+                            half_capot_dogfall = ""
+
+    # 全场入球:单/双 odd_even------------------------------------------------------------------------------------------------
+                        try:
+                            odd_evens = data['o']['oe']['v']
+                            new_odd_evens = [odd_evens[i] for i in range(len(odd_evens)) if i % 2 is 1]
+                            if pt is 3:
+                                odd_even_odd = round(float(new_odd_evens[0]) - 1, 2)
+                                odd_even_even = round(float(new_odd_evens[1]) - 1, 2)
+                            else:
+                                odd_even_odd = round(float(new_odd_evens[0]), 2)
+                                odd_even_even = round(float(new_odd_evens[1]), 2)
+                        except:
+                            odd_even_odd = ""
+                            odd_even_even = ""
+                        # 半场入球:单/双 half_odd_even
+                        try:
+                            half_odd_evens = data['o']['oe1st']['v']
+                            new_half_odd_evens = [half_odd_evens[i] for i in range(len(half_odd_evens)) if i % 2 is 1]
+                            if pt is 3:
+                                half_odd_even_odd = round(float(new_half_odd_evens[0]) - 1, 2)
+                                half_odd_even_even = round(float(new_half_odd_evens[1]) - 1, 2)
+                            else:
+                                half_odd_even_odd = new_half_odd_evens[0]
+                                half_odd_even_even = new_half_odd_evens[1]
+                        except:
+                            half_odd_even_odd = ""
+                            half_odd_even_even = ""
+
+                        bodan_data = {}
+    # 波胆------------------------------------------------------------------------------------------------------------------
+                        try:
+                            bodans = data['o']['cs']['v']
+                            one_list = ["bodanhome_one_zero", "bodanhome_two_zero", "bodanhome_two_one",
+                                        "bodanhome_three_zero", "bodanhome_three_one", "bodanhome_three_two",
+                                        "bodanhome_four_zero", "bodanhome_four_one", "bodanhome_four_two",
+                                        "bodanhome_four_three"]
+                            two_list = ["bodanguest_one_zero", "bodanguest_two_zero", "bodanguest_two_one",
+                                        "bodanguest_three_zero", "bodanguest_three_one", "bodanguest_three_two",
+                                        "bodanguest_four_zero", "bodanguest_four_one", "bodanguest_four_two",
+                                        "bodanguest_four_three"]
+                            three_list = ["bodandogfall_zero_zero", "bodandogfall_one_one", "bodandogfall_two_two",
+                                          "bodandogfall_three_three", "bodandogfall_four_four"]
+                            new_bodans = [bodans[i] for i in range(len(bodans)) if i % 2 is 1]
+                            new_bodan = new_bodans[0:20]
+                            # 主队bodan_home
+                            bodan_home = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 0]
+                            for index, t in enumerate(one_list):
+                                bodan_data[t] = round(float(bodan_home[index]) - 1, 2)
+                            # 客队bodan_guest
+                            bodan_guest = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 1]
+                            for y, z in enumerate(two_list):
+                                bodan_data[z] = round(float(bodan_guest[y]) - 1, 2)
+                            bodan_dogfall = new_bodans[-7:-2]
+                            for a, b in enumerate(three_list):
+                                bodan_data[b] = round(float(bodan_dogfall[a]) - 1, 2)
+                            # 其他bodan_other
+                            bodan_data['bodanother'] = round(float(new_bodans[-1]) - 1, 2)
+                        except:
+                            pass
+
+                        try:
+                            half_bodans = data['o']['cs1st']['v']
+                            new_half_bodans = [half_bodans[i] for i in range(len(half_bodans)) if i % 2 is 1]
+                            new_one = ["halfbodanhome_one_zero", "halfbodanhome_two_zero", "halfbodanhome_two_one",
+                                       "halfbodanhome_three_zero", "halfbodanhome_three_one", "halfbodanhome_three_two"]
+                            new_two = ["halfbodanguest_one_zero", "halfbodanguest_two_zero", "halfbodanguest_two_one",
+                                       "halfbodanguest_three_zero", "halfbodanguest_three_one", "halfbodanguest_three_two"]
+                            new_three = ["halfbodandogfall_zero_zero", "halfbodandogfall_one_one",
+                                         "halfbodandogfall_two_two",
+                                         "halfbodandogfall_three_three"]
+                            halfbodan = new_half_bodans[0:12]
+                            half_bodan_home = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 0]
+                            # 队1
+                            for index, t in enumerate(new_one):
+                                bodan_data[t] = round(float(half_bodan_home[index]) - 1, 2)
+                            # 队2
+                            half_bodan_guest = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 1]
+                            for y, z in enumerate(new_two):
+                                bodan_data[z] = round(float(half_bodan_guest[y]) - 1, 2)
+                            # 和/平
+                            half_bodan_dogfall = new_half_bodans[-6:-2]
+                            for a, b in enumerate(new_three):
+                                bodan_data[b] = round(float(half_bodan_dogfall[a]) - 1, 2)
+                            # 其他
+                            bodan_data['halfbodanother'] = round(float(new_half_bodans[-1]) - 1, 2)
+                        except:
+                            pass
+                    if new_data is 12:
+                        try:
+                            home_data = data['o']['ou']['v']
+                            # 球队进球 大条件
+                            full_dict_rule['home_size_big'] = home_data[1]
+                            # 球队进球小条件
+                            full_dict_rule['home_size_small'] = home_data[3]
+
+                            if pt is 3:
+                                # 球队进球大赔率
+                                full_dict['home_size_big'] = round(float(home_data[5]) - 1, 2)
+                                # 球队进球小赔率
+                                full_dict['home_size_small'] = round(float(home_data[7]) - 1, 2)
+                            else:
+                                # 球队进球大赔率
+                                full_dict['home_size_big'] = home_data[5]
+                                # 球队进球小赔率
+                                full_dict['home_size_small'] = home_data[7]
+                        except:
+                            full_dict['home_size_small'] = ""
+                            full_dict_rule['home_size_small'] = ""
+                            full_dict['home_size_big'] = ""
+                            full_dict_rule['home_size_big'] = ""
+                        try:
+                            half_home_data = data['o']['ou1st']['v']
+                            half_dict_rule['half_home_size_big'] = half_home_data[1]
+                            half_dict_rule['half_home_size_small'] = half_home_data[3]
+
+                            if pt is 3:
+                                half_dict['half_home_size_big'] = round(float(half_home_data[5]) - 1, 2)
+                                half_dict['half_home_size_small'] = round(float(half_home_data[7]) - 1, 2)
+                            else:
+                                half_home_size_big = half_home_data[5]
+                                half_dict['half_home_size_big'] = half_home_size_big
+                                half_home_size_small = half_home_data[7]
+                                half_dict['half_home_size_small'] = half_home_size_small
+
+                        except:
+                            half_dict_rule['half_home_size_big'] = ""
+                            half_dict['half_home_size_big'] = ""
+                            half_dict_rule['half_home_size_small'] = ""
+                            half_dict['half_home_size_small'] = ""
+
+                    if new_data is 13:
+                        try:
+                            guest_data = data['o']['ou']['v']
+                            full_dict_rule['guest_size_big'] = guest_data[1]
+                            full_dict_rule['guest_size_small'] = guest_data[3]
+
+                            if pt is 3:
+                                full_dict['guest_size_big'] = round(float(guest_data[5]) - 1, 2)
+                                full_dict['guest_size_small'] = round(float(guest_data[7]) - 1, 2)
+                            else:
+                                full_dict['guest_size_big'] = guest_data[5]
+                                full_dict['guest_size_small'] = guest_data[7]
+                        except:
+                            full_dict_rule['guest_size_big'] = ""
+                            full_dict['guest_size_big'] = ""
+                            full_dict_rule['guest_size_small'] = ""
+                            full_dict['guest_size_small'] = ''
+                        try:
+                            half_guest_data = data['o']['ou1st']['v']
+                            half_dict_rule['half_guest_size_big'] = half_guest_data[1]
+                            half_dict_rule['half_guest_size_small'] = half_guest_data[3]
+                            if pt is 3:
+                                half_dict['half_guest_size_big'] = round(float(half_guest_data[5]) - 1, 2)
+                                half_dict['half_guest_size_small'] = round(float(half_guest_data[7]) - 1, 2)
+                            else:
+                                half_dict['half_guest_size_big'] = half_guest_data[5]
+                                half_dict['half_guest_size_small'] = half_guest_data[7]
+                        except:
+                            half_dict_rule['half_guest_size_big'] = ""
+                            half_dict['half_guest_size_big'] = ""
+
+                            half_dict_rule['half_guest_size_small'] = ""
+                            half_dict['half_guest_size_small'] = ""
+
+                item['league_id'] = league_id
+                item['league_name'] = league_name
+                item['pt'] = pt
+                item['game_id'] = game_id
+                item['team_home'] = team_home
+                item['team_guest'] = team_guest
+                item['number'] = number
+                item['data_game'] = data_game
+                item['time_game'] = time_game
+                item['corner_ball'] = corner_ball
+                # 波胆
+                item['bodan_data'] = bodan_data
+                # 早盘入球数单双
+                item["odd_even_odd"] = odd_even_odd
+                item["odd_even_even"] = odd_even_even
+                item["half_odd_even_odd"] = half_odd_even_odd
+                item["half_odd_even_even"] = half_odd_even_even
+
+                item['total_goal'] = total_goal
+
+                item["half_capot_home"] = half_capot_home
+                item["half_capot_guest"] = half_capot_guest
+                item["half_capot_dogfall"] = half_capot_dogfall
+
+                item["capot_home"] = capot_home
+                item["capot_guest"] = capot_guest
+                item["capot_dogfall"] = capot_dogfall
+
+                item["first_last_ball"] = first_last_ball
+
+                item["half_full"] = half_full
+
+                item["half_size_guest"] = half_size_guest
+                item["half_size_guest_rule"] = half_size_guest_rule
+                item["half_size_home"] = half_size_home
+                item["half_size_home_rule"] = half_size_home_rule
+                # 全场大小
+                item["size_guest"] = size_guest
+                item["size_guest_rule"] = size_guest_rule
+                item["size_home"] = size_home
+                item["size_home_rule"] = size_home_rule
+                # 上半场让球
+                item["half_concede_home_rule"] = half_concede_home_rule
+                item["half_concede_home"] = half_concede_home
+                item["half_concede_guest_rule"] = half_concede_guest_rule
+                item["half_concede_guest"] = half_concede_guest
+                # 全场让球
+                item["concede_guest"] = concede_guest
+                item["concede_guest_rule"] = concede_guest_rule
+                item["concede_home"] = concede_home
+                item["concede_home_rule"] = concede_home_rule
+
+                item['full_data'] = full_dict
+                item['half_data'] = half_dict
+                item['full_data_rule'] = full_dict_rule
+                item['half_data_rule'] = half_dict_rule
+                item['zuqiu'] = zuqiu
+                yield item