Your Name 6 rokov pred
rodič
commit
80b0dddf3c

+ 148 - 174
hg3535/.idea/workspace.xml

@@ -1,18 +1,12 @@
 <?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="'更新日志按天输出'">
+    <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$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/ball_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/ball_func.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/pipelines.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipelines.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/settings.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/bangqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/bq_jieshu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/bq_jieshu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/guanjun.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/guanjun.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/lanqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/liansai.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/liansai.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/wangqiu.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/wqbodan.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/wqbodan.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/spiders/wq_jieshu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/wq_jieshu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/spiders/zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/zuqiu.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -53,61 +47,49 @@
       <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="376">
-              <caret line="164" column="15" lean-forward="true" selection-start-line="164" selection-start-column="15" selection-end-line="164" selection-end-column="15" />
+            <state relative-caret-position="630">
+              <caret line="164" column="15" selection-start-line="164" selection-start-column="15" selection-end-line="164" selection-end-column="15" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/pipelines.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="420">
-              <caret line="500" column="104" selection-start-line="500" selection-start-column="99" selection-end-line="500" selection-end-column="109" />
+            <state relative-caret-position="954">
+              <caret line="176" column="51" lean-forward="true" selection-start-line="176" selection-start-column="51" selection-end-line="176" selection-end-column="51" />
               <folding>
                 <element signature="e#0#11#0" expanded="true" />
-                <element signature="e#32964#33904#0" />
-                <element signature="e#33945#34885#0" />
-                <element signature="e#36837#37777#0" />
-                <element signature="e#50449#51863#0" />
-                <element signature="e#53648#55062#0" />
-                <element signature="e#55412#56853#0" />
-                <element signature="e#57419#58765#0" />
-                <element signature="e#52853#60217#0" />
-                <element signature="e#60368#69091#0" />
-                <element signature="e#86412#100532#0" />
-                <element signature="e#100586#115127#0" />
-                <element signature="e#115180#129155#0" />
-                <element signature="e#129310#132017#0" />
-                <element signature="e#132173#133571#0" />
-                <element signature="e#133728#135163#0" />
-                <element signature="e#135320#136755#0" />
+                <element signature="e#30311#41163#0" />
+                <element signature="e#34870#37800#0" />
+                <element signature="e#38057#39274#0" />
+                <element signature="e#39313#40448#0" />
+                <element signature="e#40490#41635#0" />
+                <element signature="e#39802#41143#0" />
+                <element signature="e#41319#45407#0" />
+                <element signature="e#45561#56897#0" />
+                <element signature="e#57047#63553#0" />
+                <element signature="e#63704#72423#0" />
+                <element signature="e#72592#89692#0" />
+                <element signature="e#89744#103864#0" />
+                <element signature="e#103918#118459#0" />
+                <element signature="e#118512#132487#0" />
+                <element signature="e#132642#135349#0" />
+                <element signature="e#135505#136903#0" />
+                <element signature="e#137060#138495#0" />
+                <element signature="e#138652#140087#0" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/main.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="162">
-              <caret line="9" column="38" lean-forward="true" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
-              <folding>
-                <element signature="e#0#10#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="216">
-              <caret line="48" column="10" lean-forward="true" selection-start-line="48" selection-start-column="10" selection-end-line="48" selection-end-column="10" />
+            <state relative-caret-position="72">
+              <caret line="489" selection-start-line="489" selection-end-line="489" />
               <folding>
                 <element signature="e#24#35#0" expanded="true" />
-                <element signature="e#32627#40411#0" />
-                <element signature="e#41077#48991#0" />
               </folding>
             </state>
           </provider>
@@ -116,8 +98,8 @@
       <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="6935">
-              <caret line="859" column="42" lean-forward="true" selection-start-line="859" selection-start-column="42" selection-end-line="859" selection-end-column="42" />
+            <state relative-caret-position="357">
+              <caret line="509" column="29" selection-start-line="509" selection-start-column="29" selection-end-line="509" selection-end-column="29" />
               <folding>
                 <element signature="e#0#15#0" expanded="true" />
               </folding>
@@ -125,24 +107,6 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="162">
-              <caret line="17" column="26" lean-forward="true" selection-start-line="17" selection-start-column="26" selection-end-line="17" selection-end-column="26" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-774">
-              <caret line="21" selection-start-line="21" selection-end-line="22" selection-end-column="104" />
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -154,11 +118,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>t1</find>
-      <find>pid</find>
-      <find>corner_ball</find>
-      <find>print</find>
-      <find>match_id</find>
       <find>half_concede_home</find>
       <find>conn</find>
       <find>result</find>
@@ -169,7 +128,6 @@
       <find>total_goals</find>
       <find>2or7</find>
       <find>st_zq_league</find>
-      <find>zqtwo_intodb</find>
       <find>odds_only</find>
       <find>wq_</find>
       <find>Zuqiustatus</find>
@@ -184,6 +142,12 @@
       <find>3206572</find>
       <find>bqone_intodb</find>
       <find>sizes</find>
+      <find>wqone_intodb</find>
+      <find>one_intodb</find>
+      <find>two_intodb</find>
+      <find>zqone_intodb</find>
+      <find>zqo_intodb</find>
+      <find>zqtwo_intodb</find>
     </findStrings>
   </component>
   <component name="Git.Settings">
@@ -266,10 +230,8 @@
         <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/lq_jieshu.py" />
-        <option value="$PROJECT_DIR$/spiders/wq_jieshu.py" />
         <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
         <option value="$PROJECT_DIR$/spiders/liansai.py" />
         <option value="$PROJECT_DIR$/spiders/guanjun.py" />
@@ -279,13 +241,15 @@
         <option value="$PROJECT_DIR$/spiders/wqbodan.py" />
         <option value="$PROJECT_DIR$/spiders/bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
-        <option value="$PROJECT_DIR$/pipelines.py" />
         <option value="$PROJECT_DIR$/main.py" />
         <option value="$PROJECT_DIR$/spiders/lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/wq_jieshu.py" />
+        <option value="$PROJECT_DIR$/ball_func.py" />
+        <option value="$PROJECT_DIR$/pipelines.py" />
       </list>
     </option>
   </component>
-  <component name="ProjectFrameBounds" extendedState="6">
+  <component name="ProjectFrameBounds" extendedState="7">
     <option name="x" value="9" />
     <option name="y" value="20" />
     <option name="width" value="1936" />
@@ -322,7 +286,7 @@
   </component>
   <component name="PropertiesComponent">
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../20190528/sports_scrapy" />
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
     <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
@@ -569,7 +533,8 @@
       <workItem from="1558529201114" duration="63104000" />
       <workItem from="1558918879384" duration="20712000" />
       <workItem from="1559039245474" duration="433000" />
-      <workItem from="1559046451714" duration="20901000" />
+      <workItem from="1559046451714" duration="22615000" />
+      <workItem from="1559195646143" duration="13959000" />
     </task>
     <task id="LOCAL-00001" summary="修改后,版本二">
       <created>1555727493584</created>
@@ -711,11 +676,18 @@
       <option name="project" value="LOCAL" />
       <updated>1558345052627</updated>
     </task>
-    <option name="localTasksCounter" value="21" />
+    <task id="LOCAL-00021" summary="'更新'">
+      <created>1559114920607</created>
+      <option name="number" value="00021" />
+      <option name="presentableId" value="LOCAL-00021" />
+      <option name="project" value="LOCAL" />
+      <updated>1559114920607</updated>
+    </task>
+    <option name="localTasksCounter" value="22" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="1580545000" />
+    <option name="totallyTimeSpent" value="1596218000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -727,10 +699,10 @@
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
+    <frame x="-8" y="-8" width="1936" height="1066" extended-state="7" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.18283582" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.18496802" />
       <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" />
@@ -744,7 +716,7 @@
       <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 active="true" anchor="bottom" id="Run" order="11" sideWeight="0.4946695" visible="true" weight="0.37982833" />
+      <window_info anchor="bottom" id="Run" order="11" sideWeight="0.4946695" weight="0.37982833" />
       <window_info anchor="bottom" id="Python Console" order="12" sideWeight="0.49946696" weight="0.4356223" />
       <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" />
@@ -845,9 +817,9 @@
     <MESSAGE value="更新" />
     <MESSAGE value="Merge http://git.meme100.com:10180/aqm/sports_scrapy&#10;&#10;# Conflicts:&#10;#&#9;hg3535/settings.py" />
     <MESSAGE value="Merge http://git.meme100.com:10180/aqm/sports_scrapy&#10;&#10;# Conflicts:&#10;#&#9;hg3535/settings.py&#10;'更新'" />
-    <MESSAGE value="'更新'" />
     <MESSAGE value="'更新日志按天输出'" />
-    <option name="LAST_COMMIT_MESSAGE" value="'更新日志按天输出'" />
+    <MESSAGE value="'更新'" />
+    <option name="LAST_COMMIT_MESSAGE" value="'更新'" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
@@ -971,15 +943,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/jianting.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state>
-          <folding>
-            <element signature="e#0#9#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" />
@@ -1048,26 +1011,6 @@
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/log/zq_jieshu_2019_5_27.log" />
-    <entry file="file://$PROJECT_DIR$/spiders/zq_jieshu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="196">
-          <caret line="61" selection-start-line="61" selection-end-line="65" selection-end-column="30" />
-          <folding>
-            <element signature="e#36#51#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wq_jieshu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <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$/spiders/lq_jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="277">
@@ -1078,26 +1021,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/middlewares.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <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#168#181#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="18">
-          <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$/spiders/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="111">
@@ -1158,64 +1081,50 @@
     <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="162">
-          <caret line="17" column="26" lean-forward="true" selection-start-line="17" selection-start-column="26" selection-end-line="17" selection-end-column="26" />
+          <caret line="17" column="26" selection-start-line="17" selection-start-column="26" selection-end-line="17" selection-end-column="26" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipelines.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="420">
-          <caret line="500" column="104" selection-start-line="500" selection-start-column="99" selection-end-line="500" selection-end-column="109" />
-          <folding>
-            <element signature="e#0#11#0" expanded="true" />
-            <element signature="e#32964#33904#0" />
-            <element signature="e#33945#34885#0" />
-            <element signature="e#36837#37777#0" />
-            <element signature="e#50449#51863#0" />
-            <element signature="e#53648#55062#0" />
-            <element signature="e#55412#56853#0" />
-            <element signature="e#57419#58765#0" />
-            <element signature="e#52853#60217#0" />
-            <element signature="e#60368#69091#0" />
-            <element signature="e#86412#100532#0" />
-            <element signature="e#100586#115127#0" />
-            <element signature="e#115180#129155#0" />
-            <element signature="e#129310#132017#0" />
-            <element signature="e#132173#133571#0" />
-            <element signature="e#133728#135163#0" />
-            <element signature="e#135320#136755#0" />
-          </folding>
+        <state relative-caret-position="-774">
+          <caret line="21" selection-start-line="21" selection-end-line="22" selection-end-column="104" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/ball_func.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zq_jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="6935">
-          <caret line="859" column="42" lean-forward="true" selection-start-line="859" selection-start-column="42" selection-end-line="859" selection-end-column="42" />
+        <state relative-caret-position="462">
+          <caret line="61" selection-start-line="61" selection-end-line="65" selection-end-column="30" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#36#51#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/middlewares.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-774">
-          <caret line="21" selection-start-line="21" selection-end-line="22" selection-end-column="104" />
+        <state relative-caret-position="486">
+          <caret line="137" column="10" selection-start-line="137" selection-start-column="8" selection-end-line="137" selection-end-column="34" />
+          <folding>
+            <element signature="e#168#181#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/settings.py">
+    <entry file="file://$PROJECT_DIR$/jianting.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="376">
-          <caret line="164" column="15" lean-forward="true" selection-start-line="164" selection-start-column="15" selection-end-line="164" selection-end-column="15" />
+        <state>
+          <folding>
+            <element signature="e#0#9#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/main.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="162">
-          <caret line="9" column="38" lean-forward="true" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
+          <caret line="9" column="38" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
           <folding>
             <element signature="e#0#10#0" expanded="true" />
           </folding>
@@ -1224,12 +1133,77 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="216">
-          <caret line="48" column="10" lean-forward="true" selection-start-line="48" selection-start-column="10" selection-end-line="48" selection-end-column="10" />
+        <state relative-caret-position="6984">
+          <caret line="453" column="50" selection-start-line="453" selection-start-column="45" selection-end-line="453" selection-end-column="54" />
           <folding>
             <element signature="e#24#35#0" expanded="true" />
-            <element signature="e#32627#40411#0" />
-            <element signature="e#41077#48991#0" />
+            <element signature="e#33118#41233#0" />
+            <element signature="e#41448#49794#0" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/spiders/wq_jieshu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="360">
+          <caret line="20" column="168" selection-start-line="20" selection-start-column="168" selection-end-line="20" selection-end-column="168" />
+          <folding>
+            <element signature="e#24#39#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/ball_func.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="357">
+          <caret line="509" column="29" selection-start-line="509" selection-start-column="29" selection-end-line="509" selection-end-column="29" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="72">
+          <caret line="489" selection-start-line="489" selection-end-line="489" />
+          <folding>
+            <element signature="e#24#35#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/settings.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="630">
+          <caret line="164" column="15" selection-start-line="164" selection-start-column="15" selection-end-line="164" selection-end-column="15" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pipelines.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="954">
+          <caret line="176" column="51" lean-forward="true" selection-start-line="176" selection-start-column="51" selection-end-line="176" selection-end-column="51" />
+          <folding>
+            <element signature="e#0#11#0" expanded="true" />
+            <element signature="e#30311#41163#0" />
+            <element signature="e#34870#37800#0" />
+            <element signature="e#38057#39274#0" />
+            <element signature="e#39313#40448#0" />
+            <element signature="e#40490#41635#0" />
+            <element signature="e#39802#41143#0" />
+            <element signature="e#41319#45407#0" />
+            <element signature="e#45561#56897#0" />
+            <element signature="e#57047#63553#0" />
+            <element signature="e#63704#72423#0" />
+            <element signature="e#72592#89692#0" />
+            <element signature="e#89744#103864#0" />
+            <element signature="e#103918#118459#0" />
+            <element signature="e#118512#132487#0" />
+            <element signature="e#132642#135349#0" />
+            <element signature="e#135505#136903#0" />
+            <element signature="e#137060#138495#0" />
+            <element signature="e#138652#140087#0" />
           </folding>
         </state>
       </provider>

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


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


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


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


+ 24 - 505
hg3535/ball_func.py

@@ -512,508 +512,27 @@ def news_times(ctime):
     return match_date, match_time, time3
 
 
-# def hash_func(match_id, odds_code, sort, p_id):
-#     m = hashlib.md5()
-#     a = str(match_id) + str(odds_code) + str(sort) + str(p_id)
-#     m.update(a.encode('utf-8'))
-#     c = m.hexdigest()
-#     return c
-#
-#
-# # 生成odds_only哈希
-# def r_func(match_id, odds_code, sort, p_id, odd):
-#     m = hashlib.md5()
-#     a = str(match_id) + str(odds_code) + str(sort) + str(p_id) + str(odd)
-#     m.update(a.encode('utf-8'))
-#     c = m.hexdigest()
-#     return c
-#
-#
-# # 转换成本地时间
-# def new_time(ctime):
-#     time1 = time.mktime(time.strptime(ctime, '%Y-%m-%d %H:%M:%S')) + 43200
-#     time2 = time.localtime(time1)
-#     time3 = time.strftime('%Y-%m-%d %H:%M:%S', time2)
-#     time4 = time3
-#     data_time = str(time4).split(" ")
-#     match_date = data_time[0]
-#     match_time = data_time[1]
-#     return match_date, match_time, time3
-#
-#
-# def out_time(ctime, i):
-#     ctime1 = datetime.datetime.strptime(ctime, "%Y-%m-%d %H:%M:%S")
-#     n_ctime = (ctime1 + datetime.timedelta(hours=i)).strftime("%Y-%m-%d %H:%M:%S")
-#     return n_ctime
-#
-#
-# def fuhao(f):
-#     if f.startswith('+'):
-#         f = f.replace('+', '-')
-#         return f
-#     elif f.startswith('-'):
-#         f = f.replace('-', '+')
-#         return f
-#     else:
-#         return f
-#
-#
-# # 篮球插入赔率 -----------------------------------------------------------------------------------------------------------
-# def one_intodb(data1, data2, data3, cursor, redis_db):
-#     if data1:
-#         for key, value in data1.items():
-#             if value:
-#                 for x, y in enumerate(value):
-#                     new_hash = hash_func(match_id=data2['game_id'], odds_code=key, sort=x, p_id=data2['p_id'])
-#                     r_hash = r_func(match_id=data2['game_id'], odds_code=key, sort=x, p_id=data2['p_id'],odd=y)
-#                     odds_only = r_hash
-#                     l_f = fuhao(str(data3[key][x]))
-#                     if redis_db.hexists("hg3535_lanqiu", r_hash):
-#                         pass
-#                     else:
-#                         redis_db.hset("hg3535_lanqiu", r_hash, 0)
-#                         sql1 = "insert into st_lq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#                         cursor.execute(sql1, (
-#                             int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], y,
-#                             data2['p_id'], data2["p_code"], x, data2["source"], new_hash,
-#                             l_f, data2['expire_time'], odds_only,data2['utime'], y, data2['expire_time'],
-#                             odds_only, l_f))
-#                         # 更新主队st_zq_odds_record表
-#                         sql2 = "insert into st_lq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only) values (%s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s,%s);"
-#                         cursor.execute(sql2, (
-#                             int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], y,
-#                             data2['p_id'], data2["p_code"], x, data2["source"], l_f, odds_only))
-#
-#
-# def two_intodb(data1, data2, data3, cursor, redis_db):
-#     if data1:
-#         for key, value in data1.items():
-#             if value:
-#                 new_hash = hash_func(match_id=data2['game_id'], odds_code=data3 + key, sort=data2['sort'], p_id=data2['p_id'])
-#
-#                 r_hash = r_func(match_id=data2['game_id'], odds_code=data3 + key, sort=data2['sort'], p_id=data2['p_id'],odd=value)
-#                 odds_only = r_hash
-#                 if redis_db.hexists("hg3535_lanqiu", r_hash):
-#                     pass
-#                 else:
-#                     redis_db.hset("hg3535_lanqiu", r_hash, 0)
-#                     sql1 = "insert into st_lq_odds(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, sort, source, sole, condition, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#                     cursor.execute(sql1, (
-#                         int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], new_hash,
-#                         key, data2['expire_time'], odds_only,data2['utime'], value, data2['expire_time'], odds_only,key))
-#                     # 更新主队st_zq_odds_record表
-#                     sql2 = "insert into st_lq_odds_record(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, sort, source, condition,odds_only) values (%s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s,%s);"
-#                     cursor.execute(sql2, (
-#                         int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], key, odds_only))
-#
-#
-# def three_intodb(data1, data2, cursor, redis_db):
-#     if data1:
-#         for key, value in data1.items():
-#             if value:
-#                 new_hash = hash_func(match_id=data2['game_id'], odds_code=key, sort=data2['sort'], p_id=data2['p_id'])
-#
-#                 r_hash = r_func(match_id=data2['game_id'], odds_code=key, sort=data2['sort'], p_id=data2['p_id'],odd=value)
-#                 odds_only = r_hash
-#                 if redis_db.hexists("hg3535_lanqiu", r_hash):
-#                     pass
-#                 else:
-#                     redis_db.hset("hg3535_lanqiu", r_hash, 0)
-#                     sql1 = "insert into st_lq_odds(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, sort, source, sole, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s, %s,%s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s;"
-#                     cursor.execute(sql1, (
-#                         int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], new_hash, data2['expire_time'],
-#                         odds_only,data2['utime'], value, data2['expire_time'], odds_only))
-#                     # 更新主队st_zq_odds_record表
-#                     sql2 = "insert into st_lq_odds_record(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, sort, source,odds_only) values (%s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s);"
-#                     cursor.execute(sql2, (
-#                         int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], odds_only))
-#
-#
-# # 插入篮球赛事表
-# def into_competition(data, cursor):
-#     Competition_sql = "insert into st_lq_competition(home_team, guest_team, lg_id, match_id, match_date, match_time, ctime, utime, tag, type, source,expire_time,is_today,is_morningplate,is_stringscene) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s,%s, %s, %s) on conflict(match_id) do update set tag = %s,expire_time=%s,is_today=%s,is_morningplate=%s,is_stringscene=%s;"
-#     cursor.execute(Competition_sql, (
-#         data['team_home'], data['team_guest'], data['league_id'], data['game_id'], data['match_date'],
-#         data['match_time'],
-#         data['utime'], data['utime'], data['number'], data['pt'], data["source"], data['expire_time'], data['is_today'],
-#         data['is_morningplate'], data['is_stringscene'], data['number'], data['expire_time'], data['is_today'],
-#         data['is_morningplate'], data['is_stringscene']))
-#
-#
-# # 插入足球赛事表----------------------------------------------------------------------------------------------------------
-# def zqone_competition(data, cursor):
-#     Competition_sql = "insert into st_zq_competition(home_team, guest_team, lg_id, match_id, match_date, match_time, ctime, utime, tag,source, expire_time,is_today,us_time) values (%s, %s, %s, %s, %s, %s, %s,%s, %s, %s,%s,%s,%s) on conflict(match_id) do update set tag = %s,expire_time=%s,is_today=%s,us_time=%s;"
-#     cursor.execute(Competition_sql, (
-#         data['team_home'], data['team_guest'], data['league_id'], data['game_id'], data['match_date'],
-#         data['match_time'],
-#         data['utime'], data['utime'], data['number'], data["source"], data['expire_time'], data['is_today'],
-#         data['us_time'], data['number'], data['expire_time'], data['is_today'],data['us_time']))
-#
-#
-# def zqtwo_competition(data, cursor):
-#     Competition_sql = "insert into st_zq_competition(home_team, guest_team, lg_id, match_id, match_date, match_time, ctime, utime, tag,source, expire_time,is_morningplate,us_time) values (%s, %s, %s, %s, %s, %s, %s,%s, %s, %s,%s,%s,%s) on conflict(match_id) do update set tag = %s,expire_time=%s,is_morningplate=%s,us_time=%s;"
-#     cursor.execute(Competition_sql, (
-#         data['team_home'], data['team_guest'], data['league_id'], data['game_id'], data['match_date'],
-#         data['match_time'],
-#         data['utime'], data['utime'], data['number'], data["source"], data['expire_time'], data['is_morningplate'],
-#         data['us_time'], data['number'], data['expire_time'], data['is_morningplate'], data['us_time']))
-#
-#
-# def zqthree_competition(data, cursor):
-#     Competition_sql = "insert into st_zq_competition(home_team, guest_team, lg_id, match_id, match_date, match_time, ctime, utime, tag,source, expire_time,is_stringscene,us_time) values (%s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s,%s,%s) on conflict(match_id) do update set tag = %s,expire_time=%s,is_stringscene=%s,us_time=%s;"
-#     cursor.execute(Competition_sql, (
-#         data['team_home'], data['team_guest'], data['league_id'], data['game_id'], data['match_date'],
-#         data['match_time'],
-#         data['utime'], data['utime'], data['number'], data["source"], data['expire_time'], data['is_stringscene'],
-#         data['us_time'], data['number'], data['expire_time'], data['is_stringscene'], data['us_time']))
-#
-#
-# # 足球 插入赔率 让球 大小-------------------------------------------------------------------------------------------------
-# def zqone_intodb(data1, data2, data3, data4, cursor, redis_db):
-#     if data1:
-#         for index, value in enumerate(data1):
-#             if value:
-#                 new_hash = hash_func(match_id=data2['game_id'], odds_code=data3, sort=index, p_id=data2['p_id'])
-#                 r_hash = r_func(match_id=data2['game_id'], odds_code=data3, sort=index, p_id=data2['p_id'], odd=value)
-#                 odds_only = r_hash
-#                 f1 = fuhao(str(data4[index]))
-#                 if redis_db.hexists("hg3535_zuqiu", r_hash):
-#                     pass
-#                 else:
-#                     redis_db.hset("hg3535_zuqiu", r_hash, 0)
-#                     sql1 = "insert into st_zq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time,odds_only) values (%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#                     cursor.execute(sql1, (
-#                         int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], index, data2["source"], new_hash,
-#                         f1, data2['expire_time'], odds_only,data2['utime'], value, data2['expire_time'],
-#                         odds_only, f1))
-#
-#                     # 更新主队st_zq_odds_record表
-#                     sql2 = "insert into st_zq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only) values (%s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s);"
-#                     cursor.execute(sql2, (
-#                         int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], index, data2["source"], f1, odds_only))
-#
-#
-#
-# # 足球 插入赔率  独赢 单双
-# def zqtwo_intodb(data1, data2, data3, data4, cursor, redis_db):
-#     if data1:
-#         new_hash = hash_func(match_id=data2['game_id'], odds_code=data3, sort=data2['sort'], p_id=data2['p_id'])
-#         r_hash = r_func(match_id=data2['game_id'], odds_code=data3, sort=data2['sort'], p_id=data2['p_id'],
-#                         odd=data1)
-#         odds_only = r_hash
-#         if redis_db.hexists("hg3535_zuqiu", r_hash):
-#             pass
-#         else:
-#             redis_db.hset("hg3535_zuqiu", r_hash, 0)
-#             sql1 = "insert into st_zq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time, odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#             cursor.execute(sql1, (
-#                 int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], data1,
-#                 data2['p_id'], data2["p_code"], data2['sort'], data2["source"], new_hash,
-#                 data4, data2['expire_time'], odds_only, data2['utime'], data1, data2['expire_time'], odds_only,data4))
-#             # 更新主队st_zq_odds_record表
-#             sql2 = "insert into st_zq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only) values (%s,%s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s);"
-#             cursor.execute(sql2, (
-#                 int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], data1,
-#                 data2['p_id'], data2["p_code"], data2['sort'], data2["source"], data4, odds_only))
-#
-#
-# def gjz_into(data, cursor, r_hash, s_hash, redis_db):
-#     if redis_db.hexists('hg3535_guanjun', r_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_guanjun', r_hash, 0)
-#         # if pt == 1:
-#         sql = "insert into st_zq_odds(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, team, type, source, sole, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s,%s, %s, %s, %s) on conflict(sole) do update set utime = %s,odds = %s,expire_time=%s,odds_only=%s;"
-#         cursor.execute(sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['new_hash'], data['expire_time'], data['odds_only'],data['utime'],
-#             data['champion_team'], data['expire_time'], data['odds_only']))
-#         # 插入st_zq_odds_record表
-#         new_sql = "insert into st_zq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, team, type, source,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s)"
-#         cursor.execute(new_sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['odds_only']))
-#
-#     if redis_db.hexists('hg3535_liansai', s_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_liansai', s_hash, 0)
-#         league_sql = "insert into st_zq_league(name_chinese, lg_id,last_time) values (%s, %s, %s) on conflict(lg_id) do update set last_time = %s,source=%s;"
-#         cursor.execute(league_sql, (data['league_name'], data['league_id'], data['time3'], data['time3'], "hg3535"))
-#
-#
-# def gjl_into(data, cursor, r_hash, s_hash, redis_db):
-#     if redis_db.hexists('hg3535_guanjun', r_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_guanjun', r_hash, 0)
-#         sql = "insert into st_lq_odds(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, team, type, source, sole, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s,%s, %s, %s, %s) on conflict(sole) do update set utime = %s,odds = %s,expire_time=%s,odds_only=%s;"
-#         cursor.execute(sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['new_hash'], data['expire_time'], data['odds_only'],data['utime'],
-#             data['champion_team'], data['expire_time'], data['odds_only']))
-#         # 插入st_zq_odds_record表
-#         new_sql = "insert into st_lq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, team, type, source,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s)"
-#         cursor.execute(new_sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['odds_only']))
-#     # 插入st_zq_league表
-#     if redis_db.hexists('hg3535_liansai', s_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_liansai', s_hash, 0)
-#         league_sql = "insert into st_lq_league(name_chinese, lg_id,last_time) values (%s, %s, %s) on conflict(lg_id) do update set last_time = %s,source=%s;"
-#         cursor.execute(league_sql, (data['league_name'], data['league_id'], data['time3'], data['time3'], "hg3535"))
-#
-#
-# def gjw_into(data, cursor, r_hash, s_hash, redis_db):
-#     if redis_db.hexists('hg3535_guanjun', r_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_guanjun', r_hash, 0)
-#         sql = "insert into st_wq_odds(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, team, type, source, sole, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s,%s, %s, %s, %s) on conflict(sole) do update set utime = %s,odds = %s,expire_time=%s,odds_only=%s;"
-#         cursor.execute(sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['new_hash'], data['expire_time'], data['odds_only'],data['utime'],
-#             data['champion_team'], data['expire_time'], data['odds_only']))
-#         # 插入st_zq_odds_record表
-#         new_sql = "insert into st_wq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, team, type, source,odds_only) values (%s,%s, %s, %s, %s, %s, %s, %s, %s,%s, %s, %s)"
-#         cursor.execute(new_sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['odds_only']))
-#     # 插入st_zq_league表
-#     if redis_db.hexists('hg3535_liansai', s_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_liansai', s_hash, 0)
-#         league_sql = "insert into st_wq_league(name_chinese, lg_id,last_time) values (%s, %s, %s) on conflict(lg_id) do update set last_time = %s,source=%s;"
-#         cursor.execute(league_sql, (data['league_name'], data['league_id'], data['time3'], data['time3'], "hg3535"))
-#
-#
-# def gjb_into(data, cursor, r_hash, s_hash, redis_db):
-#     if redis_db.hexists('hg3535_guanjun', r_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_guanjun', r_hash, 0)
-#         sql = "insert into st_bq_odds(lg_id, odds_code, match_id, ctime, utime,odds, p_id, p_code, team, type, source, sole, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s,%s, %s, %s, %s) on conflict(sole) do update set utime = %s,odds = %s,expire_time=%s,odds_only=%s;"
-#         cursor.execute(sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['new_hash'], data['expire_time'], data['odds_only'],data['utime'],
-#             data['champion_team'], data['expire_time'], data['odds_only']))
-#         # 插入st_zq_odds_record表
-#         new_sql = "insert into st_bq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, team, type, source,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s)"
-#         cursor.execute(new_sql, (
-#             int(data['league_id']), data['new_champion'], int(data['game_id']), data['utime'], data['utime'],
-#             data['champion_team'], data['p_id'], data['new_league_name'],
-#             data['tema_home'], 1, "hg3535", data['odds_only']))
-#     # 插入st_zq_league表
-#     if redis_db.hexists('hg3535_liansai', s_hash):
-#         pass
-#     else:
-#         redis_db.hset('hg3535_liansai', s_hash, 0)
-#         league_sql = "insert into st_bq_league(name_chinese, lg_id,last_time) values (%s, %s, %s) on conflict(lg_id) do update set last_time = %s,source=%s;"
-#         cursor.execute(league_sql, (data['league_name'], data['league_id'], data['time3'], data['time3'], "hg3535"))
-#
-#
-# # 网球 插入赔率----------------------------------------------------------------------------------------------------------
-# def wqone_intodb(data1, data2, data3, cursor, redis_db):
-#     if data1:
-#         for key, value in data1.items():
-#             if value:
-#                 new_hash = hash_func(match_id=data2['game_id'], odds_code=key, sort=data2['sort'], p_id=data2['p_id'])
-#                 r_hash = r_func(match_id=data2['game_id'], odds_code=key, sort=data2['sort'], p_id=data2['p_id'], odd=value)
-#                 odds_only = r_hash
-#                 w_f = fuhao(str(data3[key]))
-#                 if redis_db.hexists("hg3535_wangqiu", r_hash):
-#                     pass
-#                 else:
-#                     redis_db.hset("hg3535_wangqiu", r_hash, 0)
-#                     sql1 = "insert into st_wq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#                     cursor.execute(sql1, (
-#                         int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], value,
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], new_hash,
-#                         w_f, data2['expire_time'], odds_only,data2['utime'], value, data2['expire_time'],
-#                         odds_only, w_f))
-#                     # 更新主队st_zq_odds_record表
-#                     sql2 = "insert into st_wq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only) values (%s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s);"
-#                     cursor.execute(sql2, (
-#                         int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], value,
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], w_f, odds_only))
-#
-#
-# # 棒球 插入赔率----------------------------------------------------------------------------------------------------------
-# def bqone_intodb(data1, data2, data3, cursor, redis_db):
-#     if data1:
-#         for key, value in data1.items():
-#             if value:
-#                 new_hash = hash_func(match_id=data2['game_id'], odds_code=key, sort=data2['sort'], p_id=data2['p_id'])
-#                 r_hash = r_func(match_id=data2['game_id'], odds_code=key, sort=data2['sort'], p_id=data2['p_id'], odd=value)
-#                 odds_only = r_hash
-#                 b_f = fuhao(str(data3[key]))
-#                 if redis_db.hexists("hg3535_bangqiu", r_hash):
-#                     pass
-#                 else:
-#                     redis_db.hset("hg3535_bangqiu", r_hash, 0)
-#                     sql1 = "insert into st_bq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time,odds_only) values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s"
-#                     cursor.execute(sql1, (
-#                         int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], value,
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], new_hash,
-#                         b_f, data2['expire_time'], odds_only, data2['utime'], value,data2['expire_time'],
-#                         odds_only, b_f))
-#                     # 更新主队st_zq_odds_record表
-#                     sql2 = "insert into st_bq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only) values (%s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s, %s);"
-#                     cursor.execute(sql2, (
-#                         int(data2['league_id']), key, int(data2['game_id']), data2['utime'], data2['utime'], value,
-#                         data2['p_id'], data2["p_code"], data2['sort'], data2["source"], b_f, odds_only))
-#
-#
-#
-# def get_pcode(corner_ball, code):
-#     code_dict = {'concede_size': 1, 'capot': 2, 'two_sides': 3, 'total_goal': 4, 'half_full': 5, 'bodan': 6,
-#                  'first_last_ball': 7, 'temaball': 11}
-#     if corner_ball == "角球":
-#         p_code = "corner_ball"
-#         p_id = 9
-#     elif corner_ball == "会晋级":
-#         p_code = "promotion"
-#         p_id = 10
-#     elif corner_ball == "罚牌数":
-#         p_code = "Penalty_card"
-#         p_id = 12
-#     else:
-#         p_code = code
-#         p_id = code_dict[code]
-#     return p_code, p_id
-
-
-
-
-
-#滚球方法都加了s
-
-# def zqone_intodbs(data1, data2, data3, data4, cursor, redis_db):
-#     if data1:
-#         for index, value in enumerate(data1):
-#             if value:
-#                 new_hash = hash_func(match_id=data2['game_id'], odds_code=data3, sort=index, p_id=data2['p_id'])
-#                 r_hash = r_func(match_id=data2['game_id'], odds_code=data3, sort=index, p_id=data2['p_id'], odd=value)
-#                 odds_only = r_hash
-#                 if redis_db.hexists("hg3535_zuqiu", r_hash):
-#                     pass
-#                 else:
-#                     redis_db.hset("hg3535_zuqiu", r_hash, 0)
-#                     # if data2['pt'] == 0:
-#                     sql1 = "insert into st_zq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time,odds_only,is_rollball) values (%s,%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#                     cursor.execute(sql1, (
-#                         int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], index, data2["source"], new_hash,
-#                         data4[index], data2['expire_time'], odds_only, 1, data2['utime'], value, data2['expire_time'],
-#                         odds_only,data4[index]))
-#
-#                     # 更新主队st_zq_odds_record表
-#                     sql2 = "insert into st_zq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only,is_rollball) values (%s,%s, %s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s);"
-#                     cursor.execute(sql2, (
-#                         int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], float(value),
-#                         data2['p_id'], data2["p_code"], index, data2["source"], data4[index], odds_only,1))
-#                     #写入数据设置默认值竟然不生效 待看
-#                     sql3 = "insert into st_zq_result(match_id, match_score, home_team, guest_team, home_score, guest_score, all_goal, status, first_score, last_score, match_winer, update_time, match_time,match_process,tag,lg_id,u_home_score,u_guest_score,source,p_code) values (%s,%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s,%s,%s,%s,%s) on conflict(match_id) do update set update_time=%s,match_score=%s,match_time=%s,match_process=%s,home_score=%s,guest_score=%s;"
-#                     cursor.execute(sql3, (
-#                         int(data2['game_id']), data2['match_score'],data2['team_home'],data2['team_guest'],data2['score_home'],data2['score_guest'],data2['number'],1,'','','',data2['utime'],data2['time_game'],data2['half_way'],data2['number'],int(data2['league_id']),0,0,'hg3535',data2["p_code"],data2['utime'],data2['match_score'],data2['time_game'],data2['half_way'],data2['score_home'],data2['score_guest']
-#                     ))
-#
-#                     sql4 = "insert into st_zq_result_record(lg_id, home_team, guest_team, home_score, guest_score, all_goal, status, first_score, last_score, match_score, match_winer, update_time, match_time,match_process,tag,match_id,source,p_code) values (%s,%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s,%s,%s);"
-#                     cursor.execute(sql4, (
-#                         int(data2['league_id']), data2['team_home'],data2['team_guest'],data2['score_home'],data2['score_guest'],data2['number'],1,'','',data2['match_score'],'',data2['utime'],data2['time_game'],data2['half_way'],data2['number'],int(data2['game_id']),'hg3535',data2["p_code"]
-#                     ))
-#
-# def zqtwo_intodbs(data1, data2, data3, data4, cursor, redis_db):
-#     if data1:
-#         new_hash = hash_func(match_id=data2['game_id'], odds_code=data3, sort=data2['sort'], p_id=data2['p_id'])
-#         r_hash = r_func(match_id=data2['game_id'], odds_code=data3, sort=data2['sort'], p_id=data2['p_id'],
-#                         odd=data1)
-#         odds_only = r_hash
-#         if redis_db.hexists("hg3535_zuqiu", r_hash):
-#             pass
-#         else:
-#             redis_db.hset("hg3535_zuqiu", r_hash, 0)
-#             # if data2['pt'] == 1:
-#             sql1 = "insert into st_zq_odds(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, sole, condition, expire_time, odds_only,is_today) values (%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) on conflict(sole) do update set utime=%s,odds=%s,expire_time=%s,odds_only=%s,condition=%s;"
-#             cursor.execute(sql1, (
-#                 int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], data1,
-#                 data2['p_id'], data2["p_code"], data2['sort'], data2["source"], new_hash,
-#                 data4, data2['expire_time'], odds_only, 1, data2['utime'], data1, data2['expire_time'], odds_only,data4))
-#             # 更新主队st_zq_odds_record表
-#             sql2 = "insert into st_zq_odds_record(lg_id, odds_code, match_id, ctime, utime, odds, p_id, p_code, sort, source, condition,odds_only, is_today) values (%s,%s,%s, %s, %s, %s, %s, %s,%s, %s, %s, %s, %s);"
-#             cursor.execute(sql2, (
-#                 int(data2['league_id']), data3, int(data2['game_id']), data2['utime'], data2['utime'], data1,
-#                 data2['p_id'], data2["p_code"], data2['sort'], data2["source"], data4, odds_only, 1))
-#
-#             sql3 = "insert into st_zq_result(match_id, match_score, home_team, guest_team, home_score, guest_score, all_goal, status, first_score, last_score, match_winer, update_time, match_time,match_process,tag,lg_id,u_home_score,u_guest_score,source,p_code) values (%s,%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s,%s,%s,%s,%s) on conflict(match_id) do update set update_time=%s,match_score=%s,match_time=%s,match_process=%s,home_score=%s,guest_score=%s;"
-#             cursor.execute(sql3, (
-#                     int(data2['game_id']), data2['match_score'],data2['team_home'],data2['team_guest'],data2['score_home'],data2['score_guest'],data2['number'],1,'','','',data2['utime'],data2['time_game'],data2['half_way'],data2['number'],int(data2['league_id']),0,0,'hg3535',data2["p_code"],data2['utime'],data2['match_score'],data2['time_game'],data2['half_way'],data2['score_home'],data2['score_guest']
-#                 ))
-#
-#             sql4 = "insert into st_zq_result_record(lg_id, home_team, guest_team, home_score, guest_score, all_goal, status, first_score, last_score, match_score, match_winer, update_time, match_time,match_process,tag,match_id,source,p_code) values (%s,%s,%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,%s,%s,%s);"
-#             cursor.execute(sql4, (
-#                     int(data2['league_id']), data2['team_home'],data2['team_guest'],data2['score_home'],data2['score_guest'],data2['number'],1,'','',data2['match_score'],'',data2['utime'],data2['time_game'],data2['half_way'],data2['number'],int(data2['game_id']),'hg3535',data2["p_code"]
-#                 ))
-#
-#
-# def zqone_competitions(data, cursor):
-#     Competition_sql = "insert into st_zq_competition(home_team, guest_team, lg_id, status, match_id, match_date, match_time, ctime, utime,tag, source,type,expire_time,us_time,is_rollball) values (%s, %s, %s, %s, %s, %s, %s,%s, %s, %s,%s,%s,%s,%s,%s) on conflict(match_id) do update set utime = %s,status=%s,tag=%s,expire_time=%s;"
-#     cursor.execute(Competition_sql, (
-#         data['team_home'], data['team_guest'], data['league_id'],1,data['game_id'], data['match_date'],
-#         data['match_time'],
-#         data['utime'], data['utime'], data['number'], data["source"], 4,data['expire_time'], data['us_time'],data['is_rollball'],
-#         data['utime'], 1, data['number'], data['expire_time']))
-#
-#
-# def get_pcodes(corner_ball, code):
-#     code_dict = {'concede_size': 1, 'capot': 2, 'two_sides': 3, 'total_goal': 4, 'half_full': 5, 'bodan': 6,
-#                  'first_last_ball': 7, 'temaball': 11}
-#     if corner_ball == "角球":
-#         p_code = "corner_ball"
-#         p_id = 9
-#     elif corner_ball == "会晋级":
-#         p_code = "promotion"
-#         p_id = 10
-#     elif corner_ball == "罚牌数":
-#         p_code = "Penalty_card"
-#         p_id = 12
-#     else:
-#         p_code = code
-#         p_id = code_dict[code]
-#     return p_code, p_id
-#
-#
-# def news_times(ctime):
-#     time1 = time.mktime(time.strptime(ctime, '%Y-%m-%d %H:%M:%S')) + 43200
-#     time2 = time.localtime(time1)
-#     time3 = time.strftime('%Y-%m-%d %H:%M:%S', time2)
-#     time4 = time3
-#     data_time = str(time4).split(" ")
-#     match_date = data_time[0]
-#     match_time = data_time[1]
-#     return match_date, match_time, time3
-
-# def new_times(ctime):
-#     time1 = time.mktime(time.strptime(ctime, '%Y-%m-%d %H:%M:%S')) + 43200
-#     time2 = time.localtime(time1)
-#     time3 = time.strftime('%Y-%m-%d %H:%M:%S', time2)
-#     data_time = str(time3).split(" ")
-#     match_date = data_time[0]
-#     match_time = data_time[1]
-#     return match_date,match_time
+def one_post(data, match_id, odds_code, p_id, league_id, p_code, condition):
+    if data:
+        new_hash = hash_func(match_id=match_id, odds_code=odds_code, sort=0, p_id=p_id)
+        r_hash = r_func(match_id=match_id, odds_code=odds_code, sort=0, p_id=p_id, odd=data)
+        payload = {
+            "game_code": "zq",
+            "title": "odds",
+            "data": {
+                "match_id": match_id,
+                "lg_id": league_id,
+                "odds_code": odds_code,
+                "status": 0,
+                "sort": 0,
+                "p_code": p_code,
+                "odds": data,
+                "condition": condition,
+                "odds_only": r_hash,
+                "sole": new_hash,
+                "source": "hg3535",
+                "type": 0,
+                "team": ""
+            }
+        }
+        return payload

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 801 - 198
hg3535/pipelines.py


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


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


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


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


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


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


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


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


+ 1 - 1
hg3535/spiders/wq_jieshu.py

@@ -18,7 +18,7 @@ class HgjieshuSpider(scrapy.Spider):
         'LOG_LEVEL': 'DEBUG',
         'LOG_FILE': "../hg3535/log/wq_jieshu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
-    start_urls = ['https://hg3535z.com/zh-cn/info-centre/sportsbook-info/results/3/normal/1']
+    start_urls = ['https://hg3535z.com/zh-cn/info-centre/sportsbook-info/results/3/normal/1', 'https://hg3535z.com/zh-cn/info-centre/sportsbook-info/results/3/normal/1']
 
     def parse(self, response):
         if response.status == 200:

+ 49 - 49
hg3535/spiders/zuqiu.py

@@ -111,7 +111,7 @@ class ZuqiuSpider(scrapy.Spider):
                         # 开赛时间
                         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]
@@ -134,7 +134,7 @@ class ZuqiuSpider(scrapy.Spider):
                             concede_home = ""
                             concede_home_rule = ""
 
-    # 上半场让球half_concede-------------------------------------------------------------------------------------------------
+# 上半场让球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]
@@ -158,7 +158,7 @@ class ZuqiuSpider(scrapy.Spider):
                             half_concede_home = ""
                             half_concede_guest_rule = ""
                             half_concede_guest = ""
-    # 全场大小size 进球大小---------------------------------------------------------------------------------------------------
+# 全场大小size 进球大小---------------------------------------------------------------------------------------------------
                         try:
                             sizes = data['o']['ou']['v']
                             new_sizes = [sizes[i] for i in range(len(sizes)) if i % 2 is 1]
@@ -182,7 +182,7 @@ class ZuqiuSpider(scrapy.Spider):
                             size_home = ""
                             size_home_rule = ""
 
-    # 上半场大小 进球大小 half_size-------------------------------------------------------------------------------------------
+# 上半场大小 进球大小 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]
@@ -211,7 +211,7 @@ class ZuqiuSpider(scrapy.Spider):
                             half_size_home = ""
                             half_size_home_rule = ""
 
-    # 全场总进球 total_goal--------------------------------------------------------------------------------------------------
+# 全场总进球 total_goal--------------------------------------------------------------------------------------------------
                         total_goal = {}
                         try:
                             total_goals = data['o']['tg']['v']
@@ -226,7 +226,7 @@ class ZuqiuSpider(scrapy.Spider):
                             total_goal["total_goal_four"] = ""
                             total_goal["total_goal_seven"] = ""
 
-    # 总进球上半场 half_total_goal-------------------------------------------------------------------------------------------
+# 总进球上半场 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]
@@ -240,7 +240,7 @@ class ZuqiuSpider(scrapy.Spider):
                             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",
@@ -255,7 +255,7 @@ class ZuqiuSpider(scrapy.Spider):
                             for index, value in enumerate(new_lists):
                                 half_full[value] = ""
 
-    # 早盘 最先/最后进球 最先进球 ---------------------------------------------------------------------------------------------
+# 早盘 最先/最后进球 最先进球 ---------------------------------------------------------------------------------------------
                         first_last_ball = {}
                         try:
                             first_balls = data['o']['ttslast']['v']
@@ -276,7 +276,7 @@ class ZuqiuSpider(scrapy.Spider):
                         except:
                             pass
 
-    # 全场独赢capot ---------------------------------------------------------------------------------------------------------
+# 全场独赢capot ---------------------------------------------------------------------------------------------------------
 
                         try:
                             capots = data['o']['1x2']['v']
@@ -391,78 +391,78 @@ class ZuqiuSpider(scrapy.Spider):
                         try:
                             home_data = data['o']['ou']['v']
                             # 球队进球 大条件
-                            full_dict_rule['score_home_big'] = home_data[1]
+                            full_dict_rule['home_tema_ball_big'] = home_data[1]
                             # 球队进球小条件
-                            full_dict_rule['score_home_small'] = home_data[3]
+                            full_dict_rule['home_tema_ball_small'] = home_data[3]
 
                             if pt is 3:
                                 # 球队进球大赔率
-                                full_dict['score_home_big'] = round(float(home_data[5]) - 1, 2)
+                                full_dict['home_tema_ball_big'] = round(float(home_data[5]) - 1, 2)
                                 # 球队进球小赔率
-                                full_dict['score_home_small'] = round(float(home_data[7]) - 1, 2)
+                                full_dict['home_tema_ball_small'] = round(float(home_data[7]) - 1, 2)
                             else:
                                 # 球队进球大赔率
-                                full_dict['score_home_big'] = home_data[5]
+                                full_dict['home_tema_ball_big'] = home_data[5]
                                 # 球队进球小赔率
-                                full_dict['score_home_small'] = home_data[7]
+                                full_dict['home_tema_ball_small'] = home_data[7]
                         except:
-                            full_dict['score_home_small'] = ""
-                            full_dict_rule['score_home_small'] = ""
-                            full_dict['score_home_big'] = ""
-                            full_dict_rule['score_home_big'] = ""
+                            full_dict['home_tema_ball_small'] = ""
+                            full_dict_rule['home_tema_ball_small'] = ""
+                            full_dict['home_tema_ball_big'] = ""
+                            full_dict_rule['home_tema_ball_big'] = ""
                         try:
                             half_home_data = data['o']['ou1st']['v']
-                            half_dict_rule['half_score_home_big'] = half_home_data[1]
-                            half_dict_rule['half_score_home_small'] = half_home_data[3]
+                            half_dict_rule['half_home_tema_ball_big'] = half_home_data[1]
+                            half_dict_rule['half_home_tema_ball_small'] = half_home_data[3]
 
                             if pt is 3:
-                                half_dict['half_score_home_big'] = round(float(half_home_data[5]) - 1, 2)
-                                half_dict['half_score_home_small'] = round(float(half_home_data[7]) - 1, 2)
+                                half_dict['half_home_tema_ball_big'] = round(float(half_home_data[5]) - 1, 2)
+                                half_dict['half_home_tema_ball_small'] = round(float(half_home_data[7]) - 1, 2)
                             else:
                                 half_home_size_big = half_home_data[5]
-                                half_dict['half_score_home_big'] = half_home_size_big
+                                half_dict['half_home_tema_ball_big'] = half_home_size_big
                                 half_home_size_small = half_home_data[7]
-                                half_dict['half_score_home_small'] = half_home_size_small
+                                half_dict['half_home_tema_ball_small'] = half_home_size_small
 
                         except:
-                            half_dict_rule['half_score_home_big'] = ""
-                            half_dict['half_score_home_big'] = ""
-                            half_dict_rule['half_score_home_small'] = ""
-                            half_dict['half_score_home_small'] = ""
+                            half_dict_rule['half_home_tema_ball_big'] = ""
+                            half_dict['half_home_tema_ball_big'] = ""
+                            half_dict_rule['half_home_tema_ball_small'] = ""
+                            half_dict['half_home_tema_ball_small'] = ""
 
                     if new_data is 13:
                         try:
                             guest_data = data['o']['ou']['v']
-                            full_dict_rule['score_guest_big'] = guest_data[1]
-                            full_dict_rule['score_guest_small'] = guest_data[3]
+                            full_dict_rule['guest_tema_ball_big'] = guest_data[1]
+                            full_dict_rule['guest_tema_ball_small'] = guest_data[3]
 
                             if pt is 3:
-                                full_dict['score_guest_big'] = round(float(guest_data[5]) - 1, 2)
-                                full_dict['score_guest_small'] = round(float(guest_data[7]) - 1, 2)
+                                full_dict['guest_tema_ball_big'] = round(float(guest_data[5]) - 1, 2)
+                                full_dict['guest_tema_ball_small'] = round(float(guest_data[7]) - 1, 2)
                             else:
-                                full_dict['score_guest_big'] = guest_data[5]
-                                full_dict['score_guest_small'] = guest_data[7]
+                                full_dict['guest_tema_ball_big'] = guest_data[5]
+                                full_dict['guest_tema_ball_small'] = guest_data[7]
                         except:
-                            full_dict_rule['score_guest_big'] = ""
-                            full_dict['score_guest_big'] = ""
-                            full_dict_rule['score_guest_small'] = ""
-                            full_dict['score_guest_small'] = ''
+                            full_dict_rule['guest_tema_ball_big'] = ""
+                            full_dict['guest_tema_ball_big'] = ""
+                            full_dict_rule['guest_tema_ball_small'] = ""
+                            full_dict['guest_tema_ball_small'] = ''
                         try:
                             half_guest_data = data['o']['ou1st']['v']
-                            half_dict_rule['half_score_guest_big'] = half_guest_data[1]
-                            half_dict_rule['half_score_guest_small'] = half_guest_data[3]
+                            half_dict_rule['half_guest_tema_ball_big'] = half_guest_data[1]
+                            half_dict_rule['half_guest_tema_ball_small'] = half_guest_data[3]
                             if pt is 3:
-                                half_dict['half_score_guest_big'] = round(float(half_guest_data[5]) - 1, 2)
-                                half_dict['half_score_guest_small'] = round(float(half_guest_data[7]) - 1, 2)
+                                half_dict['half_guest_tema_ball_big'] = round(float(half_guest_data[5]) - 1, 2)
+                                half_dict['half_guest_tema_ball_small'] = round(float(half_guest_data[7]) - 1, 2)
                             else:
-                                half_dict['half_score_guest_big'] = half_guest_data[5]
-                                half_dict['half_score_guest_small'] = half_guest_data[7]
+                                half_dict['half_guest_tema_ball_big'] = half_guest_data[5]
+                                half_dict['half_guest_tema_ball_small'] = half_guest_data[7]
                         except:
-                            half_dict_rule['half_score_guest_big'] = ""
-                            half_dict['half_score_guest_big'] = ""
+                            half_dict_rule['half_guest_tema_ball_big'] = ""
+                            half_dict['half_guest_tema_ball_big'] = ""
 
-                            half_dict_rule['half_score_guest_small'] = ""
-                            half_dict['half_score_guest_small'] = ""
+                            half_dict_rule['half_guest_tema_ball_small'] = ""
+                            half_dict['half_guest_tema_ball_small'] = ""
 
                 item['league_id'] = league_id
                 item['league_name'] = league_name

+ 10 - 0
hg3535/text.py

@@ -0,0 +1,10 @@
+import json
+
+import requests
+
+
+url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
+bb = {"game_code": "zq", "title": "competition", "data": {"home_team": "\u610f\u5927\u5229\u7532\u7ec4\u8054\u8d5b", "guest_team": " ", "lg_id": 27317, "status": 0, "match_id": 127317, "match_date": "0", "match_time": "0", "tag": "0", "source": "hg3535", "is_rollball": 0, "is_today": 0, "is_morningplate": 0, "is_stringscene": 0, "us_time": "2020-5-31"}}
+
+resp = requests.post(url, data={"data": json.dumps(bb)})
+print(resp.text)

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov