Your Name 6 年之前
父节点
当前提交
19a8df5a65

+ 249 - 191
hg3535/.idea/workspace.xml

@@ -2,16 +2,25 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="7fa42e97-ddea-4404-91db-5a9ccc162649" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/change.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/items.py" beforeDir="false" afterPath="$PROJECT_DIR$/items.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/pipeline/guanjun.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/guanjun.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/bangqiu.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/pipeline/jieshu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/jieshu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/roll_bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_bangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/roll_lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_lanqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/roll_wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_wangqiu.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/pipeline/roll_zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/roll_zuqiu.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/pipeline/zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/zuqiu.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/settings.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/spiders/guanjun.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/guanjun.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/jieshu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/jieshu.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/roll_bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_bangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/spiders/roll_lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_lanqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/spiders/roll_wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_wangqiu.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/spiders/roll_zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_zuqiu.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/zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/zuqiu.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -22,7 +31,8 @@
   </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="1567677951857" 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="1567739922251" 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$change.coverage" NAME="change Coverage Results" MODIFIED="1567740372801" 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$" />
@@ -51,12 +61,12 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/main.py">
+        <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="280">
-              <caret line="14" column="42" lean-forward="true" selection-start-line="14" selection-start-column="42" selection-end-line="14" selection-end-column="42" />
+            <state relative-caret-position="160">
+              <caret line="23" column="4" lean-forward="true" selection-start-line="23" selection-start-column="4" selection-end-line="23" selection-end-column="77" />
               <folding>
-                <element signature="e#0#10#0" expanded="true" />
+                <element signature="e#0#15#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -65,8 +75,8 @@
       <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="404">
-              <caret line="438" column="60" selection-start-line="438" selection-start-column="60" selection-end-line="438" selection-end-column="60" />
+            <state relative-caret-position="129">
+              <caret line="27" column="4" selection-start-line="27" selection-start-column="4" selection-end-line="27" selection-end-column="77" />
               <folding>
                 <element signature="e#38#53#0" expanded="true" />
               </folding>
@@ -75,55 +85,55 @@
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="180">
-              <caret line="9" column="4" selection-start-line="9" selection-end-line="9" selection-end-column="55" />
+              <caret line="10" selection-start-line="10" selection-end-line="10" selection-end-column="55" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-464">
-              <caret line="14" column="32" lean-forward="true" selection-start-line="14" selection-start-column="32" selection-end-line="14" selection-end-column="32" />
+            <state relative-caret-position="200">
+              <caret line="52" column="4" selection-start-line="52" selection-start-column="4" selection-end-line="52" selection-end-column="77" />
               <folding>
-                <element signature="e#18#32#0" expanded="true" />
+                <element signature="e#24#39#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-1622">
-              <caret line="410" column="64" selection-start-line="410" selection-start-column="64" selection-end-line="410" selection-end-column="64" />
-              <folding>
-                <element signature="e#24#35#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="140">
+              <caret line="7" column="11" lean-forward="true" selection-start-line="7" selection-start-column="11" selection-end-line="7" selection-end-column="11" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-275">
-              <caret line="569" column="17" lean-forward="true" selection-start-line="569" selection-start-column="17" selection-end-line="569" selection-end-column="17" />
+            <state relative-caret-position="-1">
+              <caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
+                <element signature="e#24#35#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/settings.py">
+        <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="61">
-              <caret line="148" column="40" selection-start-line="148" selection-start-column="40" selection-end-line="148" selection-end-column="40" />
+            <state relative-caret-position="180">
+              <caret line="54" column="4" lean-forward="true" selection-start-line="54" selection-start-column="4" selection-end-line="54" selection-end-column="77" />
+              <folding>
+                <element signature="e#24#35#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -223,7 +233,6 @@
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/log/wqbodan.log" />
         <option value="$PROJECT_DIR$/log/zuqiu.log" />
         <option value="$PROJECT_DIR$/spiders/hg3535_wangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/wqbodan.py" />
@@ -238,14 +247,12 @@
         <option value="$PROJECT_DIR$/spiders/hgjieshu.py" />
         <option value="$PROJECT_DIR$/spiders/hg3535_bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/hg3535_lanqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
         <option value="$PROJECT_DIR$/main_time.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/liansai.py" />
         <option value="$PROJECT_DIR$/ball_func.py" />
-        <option value="$PROJECT_DIR$/spiders/bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/zq_jieshu.py" />
         <option value="$PROJECT_DIR$/pipelines.py" />
         <option value="$PROJECT_DIR$/.gitignore" />
@@ -254,32 +261,35 @@
         <option value="$PROJECT_DIR$/pipeline/saiguo.py" />
         <option value="$PROJECT_DIR$/spiders/saiguo.py" />
         <option value="$PROJECT_DIR$/pipeline/wangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/bangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_wangqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_wangqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_lanqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/lanqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/lanqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/guanjun.py" />
         <option value="$PROJECT_DIR$/pipeline/guanjun.py" />
-        <option value="$PROJECT_DIR$/pipeline/roll_zuqiu.py" />
         <option value="$PROJECT_DIR$/items.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_wangqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_lanqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/roll_bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/jieshu.py" />
         <option value="$PROJECT_DIR$/pipeline/jieshu.py" />
-        <option value="$PROJECT_DIR$/settings.py" />
+        <option value="$PROJECT_DIR$/pipeline/bangqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/zuqiu.py" />
         <option value="$PROJECT_DIR$/main.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/change.py" />
+        <option value="$PROJECT_DIR$/settings.py" />
         <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_wangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/bangqiu.py" />
       </list>
     </option>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-152" />
-    <option name="y" value="94" />
+    <option name="x" value="180" />
+    <option name="y" value="118" />
     <option name="width" value="1458" />
     <option name="height" value="1017" />
   </component>
@@ -306,6 +316,11 @@
               <item name="hg3535" type="462c0819:PsiDirectoryNode" />
               <item name="spiders" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="hg3535" type="b2602c69:ProjectViewProjectNode" />
+              <item name="hg3535" type="462c0819:PsiDirectoryNode" />
+              <item name="utils" type="462c0819:PsiDirectoryNode" />
+            </path>
           </expand>
           <select />
         </subPane>
@@ -316,7 +331,7 @@
   <component name="PropertiesComponent">
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="add_unversioned_files" value="$PROJECT_DIR$/.gitignore&#10;C:/Users/admin/Desktop/sports_scrapy/hg3535/log/guanjun_2019_9_4.log" />
-    <property name="last_opened_file_path" value="C:/venv" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/change.py" />
     <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="editor.preferences.fonts.default" />
@@ -344,7 +359,29 @@
       </list>
     </option>
   </component>
-  <component name="RunManager" selected="Python.main">
+  <component name="RunManager" selected="Python.change">
+    <configuration name="change" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
+      <module name="hg3535" />
+      <option name="INTERPRETER_OPTIONS" value="" />
+      <option name="PARENT_ENVS" value="true" />
+      <envs>
+        <env name="PYTHONUNBUFFERED" value="1" />
+      </envs>
+      <option name="SDK_HOME" value="C:\venv\Scripts\python.exe" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="IS_MODULE_SDK" value="false" />
+      <option name="ADD_CONTENT_ROOTS" value="true" />
+      <option name="ADD_SOURCE_ROOTS" value="true" />
+      <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
+      <option name="SCRIPT_NAME" value="$PROJECT_DIR$/change.py" />
+      <option name="PARAMETERS" value="" />
+      <option name="SHOW_COMMAND_LINE" value="false" />
+      <option name="EMULATE_TERMINAL" value="false" />
+      <option name="MODULE_MODE" value="false" />
+      <option name="REDIRECT_INPUT" value="false" />
+      <option name="INPUT_FILE" value="" />
+      <method v="2" />
+    </configuration>
     <configuration name="hgjieshu" type="PythonConfigurationType" factoryName="Python" temporary="true">
       <module name="hg3535" />
       <option name="INTERPRETER_OPTIONS" value="" />
@@ -455,6 +492,14 @@
       <option name="INPUT_FILE" value="" />
       <method v="2" />
     </configuration>
+    <list>
+      <item itemvalue="Python.change" />
+      <item itemvalue="Python.hgjieshu" />
+      <item itemvalue="Python.liansai" />
+      <item itemvalue="Python.main" />
+      <item itemvalue="Python.wangqiu" />
+      <item itemvalue="Python.zuqiu" />
+    </list>
     <recent_temporary>
       <list>
         <item itemvalue="Python.main" />
@@ -580,7 +625,7 @@
       <workItem from="1566976369645" duration="4000" />
       <workItem from="1566976385269" duration="13184000" />
       <workItem from="1566990066292" duration="35762000" />
-      <workItem from="1567126891838" duration="169372000" />
+      <workItem from="1567126891838" duration="180881000" />
     </task>
     <task id="LOCAL-00001" summary="修改后,版本二">
       <created>1555727493584</created>
@@ -897,11 +942,25 @@
       <option name="project" value="LOCAL" />
       <updated>1567588210355</updated>
     </task>
-    <option name="localTasksCounter" value="46" />
+    <task id="LOCAL-00046" summary="updata">
+      <created>1567678420455</created>
+      <option name="number" value="00046" />
+      <option name="presentableId" value="LOCAL-00046" />
+      <option name="project" value="LOCAL" />
+      <updated>1567678420455</updated>
+    </task>
+    <task id="LOCAL-00047" summary="updata">
+      <created>1567680209050</created>
+      <option name="number" value="00047" />
+      <option name="presentableId" value="LOCAL-00047" />
+      <option name="project" value="LOCAL" />
+      <updated>1567680209050</updated>
+    </task>
+    <option name="localTasksCounter" value="48" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="1848046000" />
+    <option name="totallyTimeSpent" value="1859555000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -916,12 +975,12 @@
     <frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.15298508" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.15298508" />
       <window_info id="Structure" order="1" sideWeight="0.2882615" side_tool="true" weight="0.1108742" />
       <window_info id="Favorites" order="2" sideWeight="0.5013405" side_tool="true" weight="0.108208954" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" weight="0.32832617" />
-      <window_info anchor="bottom" id="Debug" order="2" sideWeight="0.49946696" weight="0.49570817" />
+      <window_info anchor="bottom" id="Debug" order="2" sideWeight="0.49946696" weight="0.3304721" />
       <window_info anchor="bottom" id="Cvs" order="3" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="4" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="5" weight="0.32832617" />
@@ -930,8 +989,8 @@
       <window_info anchor="bottom" id="Database Changes" order="8" />
       <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50692964" side_tool="true" weight="0.38519314" />
       <window_info anchor="bottom" x="22" y="376" width="1876" height="298" id="Terminal" order="10" sideWeight="0.49307036" weight="0.3530043" />
-      <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.4356223" />
-      <window_info active="true" anchor="bottom" id="Run" order="12" sideWeight="0.87473345" visible="true" weight="0.5075107" />
+      <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.21459228" />
+      <window_info anchor="bottom" id="Run" order="12" sideWeight="0.87473345" visible="true" weight="0.36909872" />
       <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" />
@@ -1105,11 +1164,6 @@
           <line>63</line>
           <option name="timeStamp" value="132" />
         </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/spiders/jieshu.py</url>
-          <line>39</line>
-          <option name="timeStamp" value="134" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
           <line>164</line>
@@ -1132,27 +1186,22 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_bangqiu.py</url>
-          <line>262</line>
+          <line>265</line>
           <option name="timeStamp" value="167" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_bangqiu.py</url>
-          <line>60</line>
+          <line>63</line>
           <option name="timeStamp" value="168" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_bangqiu.py</url>
-          <line>84</line>
+          <line>87</line>
           <option name="timeStamp" value="169" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/zuqiu.py</url>
-          <line>60</line>
-          <option name="timeStamp" value="189" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/spiders/zuqiu.py</url>
-          <line>423</line>
+          <line>415</line>
           <option name="timeStamp" value="190" />
         </line-breakpoint>
       </breakpoints>
@@ -1182,13 +1231,6 @@
     </expressions>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/site-packages/scrapy/utils/trackref.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="486">
-          <caret line="32" selection-start-line="32" selection-end-line="32" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36/Lib/site-packages/scrapy/http/request/__init__.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="202">
@@ -1280,23 +1322,11 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1665" />
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/spiders/liansai.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-420" />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="20">
-          <caret line="14" column="20" selection-start-line="14" selection-start-column="20" selection-end-line="14" selection-end-column="20" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="140">
@@ -1346,239 +1376,267 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/middlewares.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="500">
-          <caret line="25" selection-start-line="25" selection-end-line="25" selection-end-column="5" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="261">
+          <caret line="137" selection-start-line="137" selection-end-line="137" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
+    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python37/Lib/logging/__init__.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-180" />
+        <state relative-caret-position="108">
+          <caret line="1115" selection-start-line="1115" selection-end-line="1115" />
+        </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/log/guanjun_2019_9_4.log">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-4937">
-          <caret line="25" column="43" lean-forward="true" selection-start-line="25" selection-start-column="43" selection-end-line="25" selection-end-column="43" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="-19721">
+          <caret line="586" selection-start-line="586" selection-end-line="586" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/jianting.py">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="342">
-          <caret line="75" column="46" lean-forward="true" selection-start-line="75" selection-start-column="46" selection-end-line="75" selection-end-column="46" />
+        <state relative-caret-position="46">
+          <caret line="29" column="9" selection-start-line="29" selection-start-column="8" selection-end-line="29" selection-end-column="44" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#18#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/helper.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="244">
-          <caret line="13" selection-start-line="13" selection-end-line="13" />
+        <state relative-caret-position="238">
+          <caret line="12" selection-start-line="12" selection-end-line="13" />
           <folding>
-            <element signature="e#0#14#0" expanded="true" />
+            <element signature="e#18#32#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="420">
-          <caret line="69" column="18" lean-forward="true" selection-start-line="69" selection-start-column="16" selection-end-line="69" selection-end-column="54" />
+        <state relative-caret-position="28">
+          <caret line="20" column="10" lean-forward="true" selection-start-line="20" selection-start-column="10" selection-end-line="20" selection-end-column="10" />
           <folding>
-            <element signature="e#24#39#0" expanded="true" />
+            <element signature="e#38#53#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/items.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-700">
-          <caret line="75" column="10" selection-start-line="75" selection-start-column="10" selection-end-line="75" selection-end-column="10" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="138">
+          <caret line="478" column="14" lean-forward="true" selection-start-line="478" selection-start-column="14" selection-end-line="478" selection-end-column="14" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="108">
-          <caret line="69" column="28" selection-start-line="69" selection-start-column="28" selection-end-line="69" selection-end-column="72" />
+        <state relative-caret-position="-2140">
+          <caret line="25" column="43" lean-forward="true" selection-start-line="25" selection-start-column="43" selection-end-line="25" selection-end-column="43" />
           <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$/pipeline/bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-3820">
-          <caret line="8" column="30" lean-forward="true" selection-start-line="8" selection-start-column="30" selection-end-line="8" selection-end-column="30" />
+        <state relative-caret-position="4738">
+          <caret line="316" column="58" lean-forward="true" selection-start-line="307" selection-end-line="324" selection-end-column="39" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1034">
-          <caret line="50" column="19" selection-start-line="50" selection-start-column="12" selection-end-line="50" selection-end-column="21" />
+        <state relative-caret-position="318">
+          <caret line="261" column="27" lean-forward="true" selection-start-line="261" selection-start-column="27" selection-end-line="261" selection-end-column="27" />
           <folding>
-            <element signature="e#46#61#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-340">
-          <caret line="28" column="41" lean-forward="true" selection-start-line="28" selection-start-column="41" selection-end-line="28" selection-end-column="41" />
+        <state relative-caret-position="1598">
+          <caret line="293" column="39" lean-forward="true" selection-start-line="288" selection-end-line="305" selection-end-column="39" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/middlewares.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="261">
-          <caret line="137" selection-start-line="137" selection-end-line="137" />
-        </state>
+        <state relative-caret-position="-109" />
       </provider>
     </entry>
-    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python37/Lib/logging/__init__.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="108">
-          <caret line="1115" selection-start-line="1115" selection-end-line="1115" />
+        <state relative-caret-position="-2100">
+          <caret line="109" lean-forward="true" selection-start-line="109" selection-end-line="109" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/log/guanjun_2019_9_4.log">
+    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-19721">
-          <caret line="586" selection-start-line="586" selection-end-line="586" />
+        <state relative-caret-position="660">
+          <caret line="33" column="14" lean-forward="true" selection-start-line="33" selection-start-column="14" selection-end-line="33" selection-end-column="14" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/jianting.py">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/utils/helper.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="46">
-          <caret line="29" column="9" selection-start-line="29" selection-start-column="8" selection-end-line="29" selection-end-column="44" />
+        <state relative-caret-position="60">
+          <caret line="6" column="9" selection-start-line="6" selection-start-column="6" selection-end-line="6" selection-end-column="12" />
           <folding>
-            <element signature="e#18#33#0" expanded="true" />
+            <element signature="e#0#14#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="3573">
-          <caret line="595" column="30" selection-start-line="593" selection-end-line="599" selection-end-column="43" />
+        <state relative-caret-position="11760">
+          <caret line="600" column="58" selection-start-line="600" selection-start-column="58" selection-end-line="600" selection-end-column="58" />
           <folding>
             <element signature="e#18#33#0" expanded="true" />
-            <element signature="e#2583#3563#0" />
-            <element signature="e#3728#4959#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/guanjun.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="238">
-          <caret line="12" selection-start-line="12" selection-end-line="13" />
+        <state relative-caret-position="168">
+          <caret line="53" column="15" lean-forward="true" selection-start-line="47" selection-end-line="63" selection-end-column="39" />
           <folding>
             <element signature="e#18#32#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/guanjun.py">
+    <entry file="file://$PROJECT_DIR$/settings.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="28">
-          <caret line="20" column="10" lean-forward="true" selection-start-line="20" selection-start-column="10" selection-end-line="20" selection-end-column="10" />
+        <state relative-caret-position="2518">
+          <caret line="155" lean-forward="true" selection-start-line="155" selection-end-line="155" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/change.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="418">
+          <caret line="49" column="22" selection-start-line="49" selection-start-column="22" selection-end-line="49" selection-end-column="22" />
           <folding>
-            <element signature="e#38#53#0" expanded="true" />
+            <element signature="e#0#11#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/items.py">
+    <entry file="file://$PROJECT_DIR$/main.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="478" column="14" lean-forward="true" selection-start-line="478" selection-start-column="14" selection-end-line="478" selection-end-column="14" />
+        <state relative-caret-position="160">
+          <caret line="8" column="39" lean-forward="true" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" />
+          <folding>
+            <element signature="e#0#10#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="180">
-          <caret line="9" column="4" selection-start-line="9" selection-end-line="9" selection-end-column="55" />
+        <state relative-caret-position="234">
+          <caret line="50" column="46" lean-forward="true" selection-start-line="50" selection-start-column="46" selection-end-line="50" selection-end-column="46" />
+          <folding>
+            <element signature="e#24#35#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/settings.py">
+    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="61">
-          <caret line="148" column="40" selection-start-line="148" selection-start-column="40" selection-end-line="148" selection-end-column="40" />
+        <state>
+          <caret line="25" column="77" selection-start-line="25" selection-start-column="77" selection-end-line="25" selection-end-column="77" />
+          <folding>
+            <element signature="e#48#59#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-464">
-          <caret line="14" column="32" lean-forward="true" selection-start-line="14" selection-start-column="32" selection-end-line="14" selection-end-column="32" />
+        <state relative-caret-position="160">
+          <caret line="23" column="4" lean-forward="true" selection-start-line="23" selection-start-column="4" selection-end-line="23" selection-end-column="77" />
           <folding>
-            <element signature="e#18#32#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-275">
-          <caret line="569" column="17" lean-forward="true" selection-start-line="569" selection-start-column="17" selection-end-line="569" selection-end-column="17" />
+        <state relative-caret-position="129">
+          <caret line="27" column="4" selection-start-line="27" selection-start-column="4" selection-end-line="27" selection-end-column="77" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#38#53#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="180">
+          <caret line="10" selection-start-line="10" selection-end-line="10" selection-end-column="55" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="280">
-          <caret line="14" column="42" lean-forward="true" selection-start-line="14" selection-start-column="42" selection-end-line="14" selection-end-column="42" />
+        <state relative-caret-position="200">
+          <caret line="52" column="4" selection-start-line="52" selection-start-column="4" selection-end-line="52" selection-end-column="77" />
           <folding>
-            <element signature="e#0#10#0" expanded="true" />
+            <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="404">
-          <caret line="438" column="60" selection-start-line="438" selection-start-column="60" selection-end-line="438" selection-end-column="60" />
+        <state relative-caret-position="140">
+          <caret line="7" column="11" lean-forward="true" selection-start-line="7" selection-start-column="11" selection-end-line="7" selection-end-column="11" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="180">
+          <caret line="54" column="4" lean-forward="true" selection-start-line="54" selection-start-column="4" selection-end-line="54" selection-end-column="77" />
           <folding>
-            <element signature="e#38#53#0" expanded="true" />
+            <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1622">
-          <caret line="410" column="64" selection-start-line="410" selection-start-column="64" selection-end-line="410" selection-end-column="64" />
+        <state relative-caret-position="-1">
+          <caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
           <folding>
             <element signature="e#24#35#0" expanded="true" />
           </folding>

+ 50 - 0
hg3535/change.py

@@ -0,0 +1,50 @@
+import time
+# from venv import logger
+import redis
+from utils.helper import Helper
+from settings import R_HOST, R_PASSWORD, R_POST, R_DB, MATCH_STATUS
+
+
+def get_redis(k):
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
+    ids = rls.hgetall(k)
+    return ids
+
+
+def Change_status(ids):
+    if ids:
+        for id, up_time in ids.items():
+            match_id = id.decode()
+            up_time = up_time.decode().split('&')
+            last_time = float(up_time[0])
+            game_code = up_time[1]
+            new_time = time.time() - last_time
+            if new_time > 900:
+                status_dict = {"game_code": game_code, "title": "match_status", "source": "hg3535"}
+                data_list = []
+                data = {'match_id': match_id, 'status': 2, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
+                        "is_stringscene": 0, "is_horn": 0}
+                data_list.append(data)
+                status_dict['data'] = data_list
+                res = Helper.async_post(MATCH_STATUS, status_dict)
+                if res:
+                    if "成功" in res:
+                        # self.db.match_status35.insert(status_dict)
+                        print('{},赛事结果状态交成功, {}'.format(game_code, res))
+                        print(status_dict)
+                    else:
+                        print('{},赛事结果状态交失败, {}'.format(game_code, res))
+                        print(status_dict)
+                else:
+                    print('{},赛事结果状态接口异常提交失败, {}'.format(game_code, res))
+                    print(status_dict)
+            else:
+                print('15分钟内, 暂无球类赛事结束或取消')
+
+
+if __name__ == '__main__':
+    while True:
+        ids = get_redis('hg3535.ball.ids')
+        Change_status(ids)
+        print('*****-------球类更新状态, 运行结束--------*****')
+        time.sleep(30)

+ 1 - 1
hg3535/main.py

@@ -11,7 +11,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
 # execute(["scrapy", "crawl", "wangqiu"])
 # execute(["scrapy", "crawl", "wqbodan"])
 # execute(["scrapy", "crawl", "bangqiu"])
-execute(["scrapy", "crawl", "roll_zuqiu"]) # 滚球足球 回来要解开这个注释 其他全部解封
+# execute(["scrapy", "crawl", "roll_zuqiu"]) # 滚球足球 回来要解开这个注释 其他全部解封
 # execute(["scrapy", "crawl", "roll_lanqiu"]) #滚球篮球
 # execute(["scrapy", "crawl", "roll_wangqiu"]) #滚球网球
 # execute(["scrapy", "crawl", "roll_bangqiu"])  # 滚球棒球

+ 0 - 2
hg3535/pipeline/bangqiu.py

@@ -108,8 +108,6 @@ class Bangqiupipeline(object):
         """联赛表"""
         last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
 
-        # print(league_list)
-        # print(league_dict)
         if self.db.bq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "bq", "title": "league", "source": "hg3535"}
             league_list = []

+ 7 - 7
hg3535/pipeline/jieshu.py

@@ -31,7 +31,7 @@ class Jieshuqiupipeline(object):
         logger = logging.getLogger(__name__)
         ball = item['ball']
         match_id = item['match_id']
-        status = item['status']
+        # status = item['status']
         if ball == '足球':
             game_code = "zq"
         elif ball == '篮球':
@@ -40,14 +40,14 @@ class Jieshuqiupipeline(object):
             game_code = "wq"
         else:
             game_code = "bq"
-        if status:
-            roll_status = 1
-            self.rls.srem('hg3535.gunqiu.ids', match_id)
-        else:
-            roll_status = 2
+        # if status:
+        #     roll_status = 1
+        #     self.rls.srem('hg3535.gunqiu.ids', match_id)
+        # else:
+        #     roll_status = 2
         status_dict = {"game_code": game_code, "title": "match_status", "source": "hg3535"}
         data_list = []
-        data = {'match_id': match_id, 'status': roll_status, "is_rollball": 0, "is_today": 0, "is_morningplate": 0, "is_stringscene": 0, "is_horn": 0}
+        data = {'match_id': match_id, 'status': 2, "is_rollball": 0, "is_today": 0, "is_morningplate": 0, "is_stringscene": 0, "is_horn": 0}
         data_list.append(data)
         status_dict['data'] = data_list
         res = Helper.async_post(MATCH_STATUS, status_dict)

+ 19 - 1
hg3535/pipeline/roll_bangqiu.py

@@ -10,7 +10,7 @@ from ..utils.helper import Helper
 # from .ball_func import get_pcode, new_time, out_time
 # from concurrent.futures import ThreadPoolExecutor
 # from requests_futures.sessions import FuturesSession
-from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
+from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT, MATCH_STATUS
 
 
 class Roll_Banqiupipeline(object):
@@ -251,5 +251,23 @@ class Roll_Banqiupipeline(object):
                 logging.warning(r_data_dict)
         else:
             logger.info('棒球滚球结果记录为空, 不提交')
+        status_dict = {"game_code": 'bq', "title": "match_status", "source": "hg3535"}
+        data_list = []
+        data = {'match_id': match_id, 'status': 1, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
+                "is_stringscene": 0, "is_horn": 0}
+        data_list.append(data)
+        status_dict['data'] = data_list
+        res = Helper.async_post(MATCH_STATUS, status_dict)
+        if res:
+            if "成功" in res:
+                self.db.match_status35.insert(status_dict)
+                logger.info('{},赛事结果状态交成功, {}'.format('bq', res))
+                logger.info(status_dict)
+            else:
+                logger.warning('{},赛事结果状态交失败, {}'.format('bq', res))
+                logger.warning(status_dict)
+        else:
+            logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('bq', res))
+            logger.warning(status_dict)
         reactor.callFromThread(out.callback, item)
 

+ 19 - 1
hg3535/pipeline/roll_lanqiu.py

@@ -8,7 +8,7 @@ from twisted.internet import defer, reactor
 
 # from .ball_func import
 from ..utils.helper import Helper
-from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
+from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT, MATCH_STATUS
 
 
 class Roll_Lanqiupipeline(object):
@@ -305,4 +305,22 @@ class Roll_Lanqiupipeline(object):
                 logger.warning('篮球滚球赛事结果数据,接口异常,提交失败, {}'.format(e))
         else:
             logger.info('篮球滚球赛事结果数据,为空不提交')
+        status_dict = {"game_code": 'lq', "title": "match_status", "source": "hg3535"}
+        data_list = []
+        data = {'match_id': match_id, 'status': 1, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
+                "is_stringscene": 0, "is_horn": 0}
+        data_list.append(data)
+        status_dict['data'] = data_list
+        res = Helper.async_post(MATCH_STATUS, status_dict)
+        if res:
+            if "成功" in res:
+                self.db.match_status35.insert(status_dict)
+                logger.info('{},赛事结果状态交成功, {}'.format('lq', res))
+                logger.info(status_dict)
+            else:
+                logger.warning('{},赛事结果状态交失败, {}'.format('lq', res))
+                logger.warning(status_dict)
+        else:
+            logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('lq', res))
+            logger.warning(status_dict)
         # reactor.callFromThread(out.callback, item)

+ 20 - 1
hg3535/pipeline/roll_wangqiu.py

@@ -8,7 +8,7 @@ from ..utils.helper import Helper
 # from .ball_func import get_pcode, new_time, out_time
 # from concurrent.futures import ThreadPoolExecutor
 # from requests_futures.sessions import FuturesSession
-from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
+from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT, MATCH_STATUS
 from twisted.internet import defer, reactor
 
 class Roll_Wangqiupipeline(object):
@@ -285,4 +285,23 @@ class Roll_Wangqiupipeline(object):
                 logger.warning("网球接口数据异常, 提交失败, {}".format(e))
         else:
             logger.info('网球滚球结果记录为空, 不提交')
+
+        status_dict = {"game_code": 'wq', "title": "match_status", "source": "hg3535"}
+        data_list = []
+        data = {'match_id': match_id, 'status': 1, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
+                "is_stringscene": 0, "is_horn": 0}
+        data_list.append(data)
+        status_dict['data'] = data_list
+        res = Helper.async_post(MATCH_STATUS, status_dict)
+        if res:
+            if "成功" in res:
+                self.db.match_status35.insert(status_dict)
+                logger.info('{},赛事结果状态交成功, {}'.format('wq', res))
+                logger.info(status_dict)
+            else:
+                logger.warning('{},赛事结果状态交失败, {}'.format('wq', res))
+                logger.warning(status_dict)
+        else:
+            logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('wq', res))
+            logger.warning(status_dict)
         reactor.callFromThread(out.callback, item)

+ 39 - 1
hg3535/pipeline/roll_zuqiu.py

@@ -10,7 +10,7 @@ from twisted.internet import defer, reactor
 # from .ball_func import fuhao
 from ..utils.helper import Helper
 # from .ball_func import get_pcode
-from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT
+from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL, MATCH_RESULT, MATCH_STATUS
 
 
 # 滚球足球 插入
@@ -589,6 +589,24 @@ class Roll_Zuqiupipeline(object):
                     logger.warning(r_data_dict)
             except Exception as e:
                 logger.warning('滚球数据接口异常,提交失败, {}'.format(e))
+        status_dict = {"game_code": 'zq', "title": "match_status", "source": "hg3535"}
+        data_list = []
+        data = {'match_id': match_id, 'status': 1, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
+                "is_stringscene": 0, "is_horn": 0}
+        data_list.append(data)
+        status_dict['data'] = data_list
+        res = Helper.async_post(MATCH_STATUS, status_dict)
+        if res:
+            if "成功" in res:
+                self.db.match_status35.insert(status_dict)
+                logger.info('{},赛事结果状态交成功, {}'.format('zq', res))
+                logger.info(status_dict)
+            else:
+                logger.warning('{},赛事结果状态交失败, {}'.format('zq', res))
+                logger.warning(status_dict)
+        else:
+            logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('zq', res))
+            logger.warning(status_dict)
 
         #   角球分割处理--------------------------------------------------------------------------------------------------
         if horn_team:
@@ -1097,6 +1115,26 @@ class Roll_Zuqiupipeline(object):
                         logger.warning(r_data_dict)
                 except Exception as e:
                     logger.warning('滚球数据接口异常, 角球结果提交失败, {}'.format(e))
+
+            status_dict = {"game_code": 'zq', "title": "match_status", "source": "hg3535"}
+            data_list = []
+            data = {'match_id': match_id, 'status': 1, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
+                    "is_stringscene": 0, "is_horn": 0}
+            data_list.append(data)
+            status_dict['data'] = data_list
+            res = Helper.async_post(MATCH_STATUS, status_dict)
+            if res:
+                if "成功" in res:
+                    self.db.match_status35.insert(status_dict)
+                    logger.info('{},赛事结果状态交成功, {}'.format('zq', res))
+                    logger.info(status_dict)
+                else:
+                    logger.warning('{},赛事结果状态交失败, {}'.format('zq', res))
+                    logger.warning(status_dict)
+            else:
+                logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('zq', res))
+                logger.warning(status_dict)
+
         reactor.callFromThread(out.callback, item)
 
 

+ 9 - 9
hg3535/pipeline/zuqiu.py

@@ -20,15 +20,15 @@ class Zuqiupipeline(object):
         self.db = self.mongo[M_DB]
         # self.lock = threading.RLock()
 
-    # @defer.inlineCallbacks
-    # def process_item(self, item, spider):
-    #     out = defer.Deferred()
-    #     reactor.callInThread(self._do_calculation, item, out)
-    #     yield out
-    #     defer.returnValue(item)
-
+    @defer.inlineCallbacks
     def process_item(self, item, spider):
-    # def _do_calculation(self, item, out):
+        out = defer.Deferred()
+        reactor.callInThread(self._do_calculation, item, out)
+        yield out
+        defer.returnValue(item)
+
+    # def process_item(self, item, spider):
+    def _do_calculation(self, item, out):
         # with self.lock:
         logger = logging.getLogger(__name__)
         # 比赛日期
@@ -1058,4 +1058,4 @@ class Zuqiupipeline(object):
                     logging.warning('足球角球, 详细赔率接口异常, {}'.format(res))
             else:
                 logger.info('足球详细赔率列表为空')
-        # reactor.callFromThread(out.callback, item)
+        reactor.callFromThread(out.callback, item)

+ 1 - 1
hg3535/settings.py

@@ -151,7 +151,7 @@ ODDS_URL = 'http://stadmin.bocai108.com:19093/setOdds'
 TOKEN_URL = "http://stadmin.bocai108.com/getToken"
 MATCH_RESULT = "http://stadmin.bocai108.com:19093/setMatchResult"
 MATCH_STATUS = "http://stadmin.bocai108.com:19093/upMatch"
-ODDSCH = "http://stadmin.bocai108.com/setOddsCH"
+ODDSCH = "http://stadmin.bocai108.com:19093/setOddsCH"
 
 
 R_HOST = '192.168.2.200'

+ 6 - 6
hg3535/spiders/bangqiu.py

@@ -2,10 +2,11 @@
 import copy
 import datetime
 import json
-
+import time
+import redis
 import scrapy
 from scrapy.http import Request
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 from ..items import Bangqiu
 
 
@@ -20,6 +21,7 @@ class BqrangqiuSpider(scrapy.Spider):
         # 'LOG_LEVEL': 'DEBUG',
         # 'LOG_FILE': "../hg3535/log/bangqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def start_requests(self):
         for y in range(1, 4):
@@ -41,6 +43,8 @@ class BqrangqiuSpider(scrapy.Spider):
                     new_results = result['es']
                     for new_result in new_results:
                         game_id = str(new_result['i'][16])
+                        up_time = str(time.time()) + '&' + 'bq'
+                        self.rls.hset('hg3535.ball.ids', game_id, up_time)
                         if pt == 1:
                             url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/false/ubt/am/isp/false".format(game_id)
                             yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
@@ -54,16 +58,12 @@ class BqrangqiuSpider(scrapy.Spider):
     def parse_each(self, response):
         try:
             new_datas = json.loads(response.text)['eg']
-            # print(new_datas)
             pt = response.meta['pt']
-            # print(pt)
             bangqiu = json.loads(response.text)['i'][31]
-            # print(bangqiu)
         except:
             new_datas = ""
             pt = 0
             bangqiu = ""
-            # print(bangqiu)
         if new_datas:
             # 联赛id
             league_id = new_datas["c"]["k"]

+ 9 - 9
hg3535/spiders/jieshu.py

@@ -36,15 +36,15 @@ class HgjieshuSpider(scrapy.Spider):
         try:
             data = json.loads(response.text)
             status = data['i'][0]
-            # if not status:
-            ball = data['i'][31]
-            match_id = data['i'][2]
-                # self.rls.srem('hg3535.gunqiu.ids', match_id)
-            item = Hgjieshu()
-            item['ball'] = ball
-            item['match_id'] = match_id
-            item['status'] = status
-            yield item
+            if not status:
+                ball = data['i'][31]
+                match_id = data['i'][2]
+                self.rls.srem('hg3535.gunqiu.ids', match_id)
+                item = Hgjieshu()
+                item['ball'] = ball
+                item['match_id'] = match_id
+                # item['status'] = status
+                yield item
         except Exception as e:
             logger.warning(e)
             return

+ 8 - 3
hg3535/spiders/lanqiu.py

@@ -2,9 +2,12 @@
 import copy
 import datetime
 import json
+import time
+
+import redis
 import scrapy
 from scrapy.http import Request
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 from ..items import Lanqiu
 
 
@@ -45,11 +48,11 @@ class LanqiuSpider(scrapy.Spider):
     custom_settings = {
         "ITEM_PIPELINES": {
             "hg3535.pipeline.lanqiu.Lanqiupipeline": 300,
-            # 'hg3535.pipeline.zuqiu.Zuqiupipeline': 300,
         },
         # 'LOG_LEVEL': 'DEBUG',
         # 'LOG_FILE': "../hg3535/log/lanqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def start_requests(self):
         for y in range(1, 4):
@@ -70,7 +73,9 @@ class LanqiuSpider(scrapy.Spider):
                 for result in datas:
                     new_results = result['es']
                     for new_result in new_results:
-                        game_id = str(new_result['i'][16])
+                        game_id = new_result['i'][16]
+                        up_time = str(time.time()) + '&' + 'lq'
+                        self.rls.hset('hg3535.ball.ids', game_id, up_time)
                         if pt == 1:
                             url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/false/ubt/am/isp/false".format(game_id)
                             yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)

+ 6 - 3
hg3535/spiders/roll_bangqiu.py

@@ -1,13 +1,15 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 import datetime
+import time
+
 import jsonpath
 import redis
 import json
 import scrapy
 from scrapy.http import Request
 from ..items import Roll_Bangqiu
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 
 class BqrangqiuSpider(scrapy.Spider):
     name = 'roll_bangqiu'
@@ -15,7 +17,6 @@ class BqrangqiuSpider(scrapy.Spider):
     allowed_domains = ['hg3535z.com']
     custom_settings = {
         "ITEM_PIPELINES": {
-            # "hg3535.pipeline.Roll_Banqiupipeline": 300,
             "hg3535.pipeline.roll_bangqiu.Roll_Banqiupipeline": 350,
         },
         # 'LOG_LEVEL': 'DEBUG',
@@ -24,7 +25,7 @@ class BqrangqiuSpider(scrapy.Spider):
 
     start_urls = [
         'https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/4/pt/4/ubt/am/pn/0/sb/2/dc/null/pid/0']  # 滚球菜单 棒球滚球列url
-    rls = redis.Redis(host='192.168.2.200', port=6379, db=1, password=123456)
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def parse(self, response):
         datas = json.loads(response.text)
@@ -34,6 +35,8 @@ class BqrangqiuSpider(scrapy.Spider):
                 urls = 'https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(
                     i)
                 self.rls.sadd('hg3535.gunqiu.ids', i)
+                up_time = str(time.time()) + '&' + 'bq'
+                self.rls.hset('hg3535.ball.ids', i, up_time)
                 yield Request(url=urls, callback=self.parse_each, dont_filter=True)
 
     def parse_each(self, response):

+ 6 - 4
hg3535/spiders/roll_lanqiu.py

@@ -2,10 +2,12 @@
 import datetime
 import json
 # import jsonpath
+import time
+
 import redis
 import scrapy
 from scrapy.http import Request
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 from ..items import Roll_Lanqiu
 
 
@@ -40,8 +42,6 @@ class LanqiuSpider(scrapy.Spider):
     to_day = datetime.datetime.now()
     allowed_domains = ['hg3535z.com']
     start_urls = ['https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/2/pt/4/ubt/am/pn/0/sb/2/dc/null/pid/0']
-    #
-    # https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/2/pt/4/ubt/am/pn/0/sb/2/dc/null/pid/0
     custom_settings = {
         "ITEM_PIPELINES": {
             "hg3535.pipeline.roll_lanqiu.Roll_Lanqiupipeline": 200,
@@ -50,7 +50,7 @@ class LanqiuSpider(scrapy.Spider):
         # 'LOG_FILE': "../hg3535/log/roll_lanqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
 
-    rls = redis.Redis(host='192.168.2.200', port=6379, db=1, password=123456)
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def parse(self, response):
         responses = json.loads(response.text)
@@ -68,6 +68,8 @@ class LanqiuSpider(scrapy.Spider):
                         for e in es:
                             match_id = e['i'][16]
                             self.rls.sadd('hg3535.gunqiu.ids', match_id)
+                            up_time = str(time.time()) + '&' + 'lq'
+                            self.rls.hset('hg3535.ball.ids', match_id, up_time)
                             url = 'https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(match_id)
                             yield Request(url=url, callback=self.parse_other, dont_filter=True)
                 else:

+ 5 - 2
hg3535/spiders/roll_wangqiu.py

@@ -1,13 +1,14 @@
 # -*- coding: utf-8 -*-
 import datetime
 import json
+import time
 
 import jsonpath
 import redis
 import scrapy
 from scrapy.http import Request
 
-# from ..items import Lanqiu
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 from ..items import Roll_Wangqiu
 
 
@@ -52,7 +53,7 @@ class WangqiuSpider(scrapy.Spider):
         # 'LOG_FILE': "../hg3535/log/roll_wangqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
 
-    rls = redis.Redis(host='192.168.2.200', port=6379, db=1, password=123456)
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def parse(self, response):
         datas = json.loads(response.text)
@@ -65,6 +66,8 @@ class WangqiuSpider(scrapy.Spider):
                 # 玩法规则
                 rle = rules[index]
                 self.rls.sadd('hg3535.gunqiu.ids', id)
+                up_time = str(time.time()) + '&' + 'wq'
+                self.rls.hset('hg3535.ball.ids', id, up_time)
                 yield Request(url=urls, callback=self.parse_other, meta={'rule': rle}, dont_filter=True)
 
     def parse_other(self, response):

+ 6 - 3
hg3535/spiders/roll_zuqiu.py

@@ -4,10 +4,12 @@ import datetime
 import json
 
 # import jsonpath
+import time
+
 import redis
 import scrapy
 from scrapy.http import Request
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 from ..items import Roll_Zuqiu
 
 
@@ -23,7 +25,7 @@ class ZuqiuSpider(scrapy.Spider):
         # 'LOG_FILE': "../hg3535/log/roll_zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month,to_day.day)
     }
     start_urls = ['https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/1/pt/4/ubt/am/pn/0/sb/2/dc/null/pid/0']
-    rls = redis.Redis(host='192.168.2.200', port=6379, db=1, password=123456)
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def parse(self, response):
         responses = json.loads(response.text)
@@ -40,10 +42,11 @@ class ZuqiuSpider(scrapy.Spider):
                         es = es['es']
                         for e in es:
                             match_id = e['K']
+                            up_time = str(time.time()) + '&' + 'zq'
                             self.rls.sadd('hg3535.gunqiu.ids', match_id)
+                            self.rls.hset('hg3535.ball.ids', match_id, up_time)
                             url = 'https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(match_id)
                             yield Request(url=url, callback=self.parse_each, dont_filter=True)
-                    # self.rls.close()
                 else:
                     print('足球滚球数据为空')
         else:

+ 6 - 2
hg3535/spiders/wangqiu.py

@@ -3,12 +3,14 @@
 import copy
 import datetime
 import json
+import time
 
+import redis
 import scrapy
 from scrapy.http import Request
 
 from ..items import Wangqiu
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 
 class LanqiuSpider(scrapy.Spider):
     name = "wangqiu"
@@ -21,9 +23,9 @@ class LanqiuSpider(scrapy.Spider):
         # 'LOG_LEVEL': 'DEBUG',
         # 'LOG_FILE': "../hg3535/log/wangqiu_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
     }
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def start_requests(self):
-        # newall_lists = ['am', 'ftht1x2', 'oe', 'tg', 'htft', 'cs', 'fglg', 'or']
         for y in range(1, 4):
             url = 'https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/3/pt/{}/ubt/am/pn/0/sb/2/dc/null/pid/0'.format(y)
             yield scrapy.Request(url=url, callback=self.parse, meta={'pt': y}, dont_filter=True)
@@ -43,6 +45,8 @@ class LanqiuSpider(scrapy.Spider):
                     new_results = result['es']
                     for new_result in new_results:
                         game_id = new_result['i'][16]
+                        up_time = str(time.time()) + '&' + 'wq'
+                        self.rls.hset('hg3535.ball.ids', game_id, up_time)
                         if pt == 1:
                             url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/false/ubt/am/isp/false".format(game_id)
                             yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)

+ 5 - 13
hg3535/spiders/zuqiu.py

@@ -10,7 +10,7 @@ import scrapy
 from scrapy.http import Request
 from ..items import Zuqiu
 import datetime
-
+from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 
 class ZuqiuSpider(scrapy.Spider):
     name = 'zuqiu'
@@ -29,15 +29,12 @@ class ZuqiuSpider(scrapy.Spider):
         # 'SCHEDULER_PERSIST': False,
         # 'SCHEDULER_FLUSH_ON_START': False,
     }
-    rls = redis.Redis(host='192.168.2.200', port=6379, db=1, password=123456)
+    rls = rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def start_requests(self):
         for y in range(1, 4):
             for i in range(10):
-                y = str(y)
-                i = str(i)
-                # yield y
-                url = "https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/1/pt/" + y + "/ubt/am/pn/" + i + "/sb/2/dc/null/pid/0"
+                url = "https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/1/pt/{}/ubt/am/pn/{}/sb/2/dc/null/pid/0".format(y, i)
                 yield scrapy.Request(url=url, callback=self.parse, dont_filter=True, meta={'pt': y})
 
     def parse(self, response):
@@ -47,7 +44,6 @@ class ZuqiuSpider(scrapy.Spider):
                 try:
                     datas = json.loads(response.text).get('n-ot', "").get('egs', "")
                 except:
-                    # datas = ''
                     print("为获取到数据")
                     return
                 pt = copy.copy(response.meta['pt'])
@@ -55,11 +51,9 @@ class ZuqiuSpider(scrapy.Spider):
                     new_results = result['es']
                     for new_result in new_results:
                         game_id = new_result['k']
-                        # cls.sadd('hg3535.zq.ids', game_id)
-                        # cls.expire('hg3535.zq.ids', 300)
+                        up_time = str(time.time()) + '&' + 'zq'
+                        self.rls.hset('hg3535.ball.ids', game_id, up_time)
                         if pt == "3":
-                            local_time = time.time()
-                            self.rls.hset('hg3535.chuanchang.ids', game_id, local_time)
                             url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/false/ubt/am/isp/true".format(game_id)
                             yield Request(url=url, callback=self.parse_each, dont_filter=True, meta={'pt': pt})
                         if pt == "2":
@@ -78,13 +72,11 @@ class ZuqiuSpider(scrapy.Spider):
                 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: