浏览代码

修改赛事时间不一致

Your Name 6 年之前
父节点
当前提交
7e7c32b4bb

+ 238 - 264
hg3535/.idea/workspace.xml

@@ -3,6 +3,23 @@
   <component name="ChangeListManager">
     <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$/pipeline/bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/bangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/guanjun.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/guanjun.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/lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/lanqiu.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/wangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/wangqiu.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/zhibo.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/zhibo.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/zuqiu.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/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/zhibo.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/zhibo.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -42,111 +59,97 @@
   <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="335">
-              <caret line="17" column="42" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
+            <state relative-caret-position="461">
+              <caret line="55" column="31" lean-forward="true" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
               <folding>
-                <element signature="e#0#10#0" expanded="true" />
+                <element signature="e#0#15#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="848">
-              <caret line="49" column="21" lean-forward="true" selection-start-line="49" selection-start-column="21" selection-end-line="49" selection-end-column="21" />
+            <state relative-caret-position="-311">
+              <caret line="34" selection-start-line="34" selection-end-line="34" />
               <folding>
-                <element signature="e#0#14#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$/utils/helper.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="299">
-              <caret line="21" column="59" selection-start-line="21" selection-start-column="59" selection-end-line="21" selection-end-column="59" />
+            <state relative-caret-position="481">
+              <caret line="45" column="81" lean-forward="true" selection-start-line="45" selection-start-column="81" selection-end-line="45" selection-end-column="81" />
               <folding>
-                <element signature="e#0#14#0" expanded="true" />
+                <element signature="e#38#53#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2088">
-              <caret line="110" column="21" lean-forward="true" selection-start-line="110" selection-start-column="21" selection-end-line="110" selection-end-column="21" />
+            <state relative-caret-position="240">
+              <caret line="69" selection-start-line="69" selection-end-line="70" selection-end-column="66" />
               <folding>
-                <element signature="e#18#33#0" expanded="true" />
-                <element signature="e#34479#34589#0" />
+                <element signature="e#24#39#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/langconv.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="178">
-              <caret line="182" selection-start-line="182" selection-end-line="182" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/LocalToken.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state>
-              <caret column="48" selection-start-column="19" selection-end-column="48" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/settings.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="483">
-              <caret line="143" column="60" lean-forward="true" selection-start-line="143" selection-start-column="60" selection-end-line="143" selection-end-column="60" />
+            <state relative-caret-position="265">
+              <caret line="64" column="23" lean-forward="true" selection-start-line="64" selection-start-column="23" selection-end-line="64" selection-end-column="23" />
+              <folding>
+                <element signature="e#24#39#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-10516">
-              <caret line="26" column="41" lean-forward="true" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
+            <state relative-caret-position="320">
+              <caret line="38" column="41" selection-start-line="38" selection-start-column="40" selection-end-line="38" selection-end-column="46" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
-                <element signature="e#33612#33722#0" />
+                <element signature="e#46#61#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/bangqiu.py">
+        <entry file="file://$PROJECT_DIR$/change.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-5117">
-              <caret line="16" column="56" selection-start-line="16" selection-start-column="56" selection-end-line="16" selection-end-column="56" />
+            <state relative-caret-position="300">
+              <caret line="15" column="36" selection-start-line="15" selection-start-column="31" selection-end-line="15" selection-end-column="36" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
+                <element signature="e#0#11#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-197">
-              <caret line="47" column="39" lean-forward="true" selection-start-line="47" selection-start-column="39" selection-end-line="47" selection-end-column="39" />
+            <state relative-caret-position="401">
+              <caret line="58" column="22" lean-forward="true" selection-start-line="58" selection-start-column="22" selection-end-line="58" selection-end-column="22" />
+              <folding>
+                <element signature="e#0#15#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -162,10 +165,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>match_score_dict</find>
-      <find>南美自由杯2019</find>
-      <find>爱尔兰甲组联赛2019</find>
-      <find>爱尔兰甲组联赛</find>
       <find>corner_ball</find>
       <find>Hgjieshu</find>
       <find>total_size</find>
@@ -192,6 +191,10 @@
       <find>us_date</find>
       <find>data_game</find>
       <find>dates</find>
+      <find>new_time</find>
+      <find>us_time</find>
+      <find>ctime</find>
+      <find>datetime</find>
     </findStrings>
     <replaceStrings>
       <replace>&quot;&quot;</replace>
@@ -265,12 +268,9 @@
         <option value="$PROJECT_DIR$/change.py" />
         <option value="$PROJECT_DIR$/spiders/bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/lanqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
         <option value="$PROJECT_DIR$/spiders/guanjun.py" />
         <option value="$PROJECT_DIR$/spiders/liansai.py" />
         <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_wangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
         <option value="$PROJECT_DIR$/spiders/other_saiguo.py" />
         <option value="$PROJECT_DIR$/spiders/saiguo.py" />
@@ -278,33 +278,36 @@
         <option value="$PROJECT_DIR$/pipeline/ball_func.py" />
         <option value="$PROJECT_DIR$/pipelines.py" />
         <option value="$PROJECT_DIR$/items.py" />
-        <option value="$PROJECT_DIR$/spiders/zhibo.py" />
-        <option value="$PROJECT_DIR$/pipeline/zhibo.py" />
-        <option value="$PROJECT_DIR$/spiders/jieshu.py" />
-        <option value="$PROJECT_DIR$/spiders/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$/pipeline/guanjun.py" />
-        <option value="$PROJECT_DIR$/pipeline/wangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/jieshu.py" />
-        <option value="$PROJECT_DIR$/pipeline/bangqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/zuqiu.py" />
-        <option value="$PROJECT_DIR$/pipeline/lanqiu.py" />
         <option value="$PROJECT_DIR$/utils/LocalToken.py" />
         <option value="$PROJECT_DIR$/utils/helper.py" />
         <option value="$PROJECT_DIR$/main.py" />
         <option value="$PROJECT_DIR$/pipeline/saiguo.py" />
         <option value="$PROJECT_DIR$/settings.py" />
+        <option value="$PROJECT_DIR$/pipeline/zuqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/wangqiu.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$/pipeline/lanqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/guanjun.py" />
+        <option value="$PROJECT_DIR$/pipeline/bangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/zhibo.py" />
+        <option value="$PROJECT_DIR$/pipeline/zhibo.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_wangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/jieshu.py" />
+        <option value="$PROJECT_DIR$/pipeline/jieshu.py" />
       </list>
     </option>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-237" />
-    <option name="y" value="84" />
+    <option name="x" value="845" />
+    <option name="y" value="188" />
     <option name="width" value="1177" />
-    <option name="height" value="916" />
+    <option name="height" value="879" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -663,13 +666,8 @@
       <workItem from="1571457369771" duration="2103000" />
       <workItem from="1571476585522" duration="6394000" />
       <workItem from="1571621462229" duration="13387000" />
-    </task>
-    <task id="LOCAL-00065" summary="更新篮球, 父级玩法错误">
-      <created>1568083247057</created>
-      <option name="number" value="00065" />
-      <option name="presentableId" value="LOCAL-00065" />
-      <option name="project" value="LOCAL" />
-      <updated>1568083247058</updated>
+      <workItem from="1571651573898" duration="915000" />
+      <workItem from="1571710042121" duration="6114000" />
     </task>
     <task id="LOCAL-00066" summary="更新篮球, 父级玩法错误">
       <created>1568083734500</created>
@@ -1007,11 +1005,18 @@
       <option name="project" value="LOCAL" />
       <updated>1571648482002</updated>
     </task>
-    <option name="localTasksCounter" value="114" />
+    <task id="LOCAL-00114" summary="添加token重新获取">
+      <created>1571651674413</created>
+      <option name="number" value="00114" />
+      <option name="presentableId" value="LOCAL-00114" />
+      <option name="project" value="LOCAL" />
+      <updated>1571651674413</updated>
+    </task>
+    <option name="localTasksCounter" value="115" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="2111650000" />
+    <option name="totallyTimeSpent" value="2118679000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -1026,7 +1031,7 @@
     <frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.1433902" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.14658849" />
       <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" />
@@ -1040,7 +1045,7 @@
       <window_info anchor="bottom" id="Database Changes" order="8" />
       <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.5042644" side_tool="true" weight="0.2725322" />
       <window_info anchor="bottom" x="22" y="376" width="1876" height="298" id="Terminal" order="10" sideWeight="0.49307036" weight="0.23712446" />
-      <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.34763947" />
+      <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" visible="true" weight="0.28004292" />
       <window_info anchor="bottom" id="Run" order="12" sideWeight="0.87473345" weight="0.31545064" />
       <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" />
@@ -1171,7 +1176,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_bangqiu.py</url>
-          <line>263</line>
+          <line>265</line>
           <option name="timeStamp" value="167" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -1191,12 +1196,12 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_lanqiu.py</url>
-          <line>80</line>
+          <line>82</line>
           <option name="timeStamp" value="270" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_lanqiu.py</url>
-          <line>86</line>
+          <line>88</line>
           <option name="timeStamp" value="271" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -1216,12 +1221,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/jieshu.py</url>
-          <line>30</line>
-          <option name="timeStamp" value="294" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/jieshu.py</url>
-          <line>70</line>
+          <line>69</line>
           <option name="timeStamp" value="298" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -1234,34 +1234,19 @@
           <line>49</line>
           <option name="timeStamp" value="302" />
         </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/roll_zuqiu.py</url>
-          <line>37</line>
-          <option name="timeStamp" value="303" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
-          <line>69</line>
-          <option name="timeStamp" value="311" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
-          <line>66</line>
-          <option name="timeStamp" value="312" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
-          <line>103</line>
+          <line>102</line>
           <option name="timeStamp" value="313" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
-          <line>558</line>
+          <line>557</line>
           <option name="timeStamp" value="314" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
-          <line>561</line>
+          <line>560</line>
           <option name="timeStamp" value="315" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -1348,27 +1333,7 @@
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/spiders/other_saiguo.py" />
-    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="9660">
-          <caret line="483" selection-start-line="483" selection-end-line="484" selection-end-column="56" />
-          <folding>
-            <element signature="e#24#39#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/log/FTzhibo_2019_10_16.log" />
-    <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-4171">
-          <caret line="23" column="5" selection-start-line="23" selection-start-column="5" selection-end-line="23" selection-end-column="5" />
-          <folding>
-            <element signature="e#46#61#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/jianting.py">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
@@ -1383,16 +1348,6 @@
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/ball_func.py" />
-    <entry file="file://$PROJECT_DIR$/change.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="800">
-          <caret line="40" column="17" lean-forward="true" selection-start-line="40" selection-start-column="17" selection-end-line="40" selection-end-column="17" />
-          <folding>
-            <element signature="e#0#11#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/main_time.py">
       <provider selected="true" editor-type-id="text-editor">
         <state>
@@ -1412,13 +1367,7 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/guanjun.sh">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="140">
-          <caret line="7" selection-start-line="7" selection-end-line="18" selection-end-column="56" />
-        </state>
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/guanjun.sh" />
     <entry file="file://$PROJECT_DIR$/pipelines.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="120">
@@ -1426,26 +1375,10 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/requirements.txt">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-660">
-          <caret selection-end-line="61" selection-end-column="21" />
-        </state>
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/requirements.txt" />
     <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/ball_func.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="398">
-          <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-1506">
@@ -1473,96 +1406,122 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zhibo.py">
+    <entry file="file://$PROJECT_DIR$/items.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="682">
-          <caret line="118" column="39" selection-start-line="118" selection-start-column="39" selection-end-line="118" selection-end-column="39" />
-          <folding>
-            <element signature="e#38#53#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="782">
+          <caret line="506" column="25" selection-start-line="506" selection-start-column="25" selection-end-line="506" selection-end-column="25" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="522">
-          <caret line="45" column="46" selection-start-line="45" selection-start-column="46" selection-end-line="45" selection-end-column="46" />
+        <state relative-caret-position="360">
+          <caret line="24" selection-start-line="24" selection-end-line="24" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/items.py">
+    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="782">
-          <caret line="506" column="25" selection-start-line="506" selection-start-column="25" selection-end-line="506" selection-end-column="25" />
+        <state relative-caret-position="-178">
+          <caret line="72" column="36" lean-forward="true" selection-start-line="72" selection-start-column="36" selection-end-line="72" selection-end-column="36" />
+          <folding>
+            <element signature="e#24#35#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/middlewares.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="230">
-          <caret line="390" selection-start-line="390" selection-end-line="390" />
+        <state relative-caret-position="127">
+          <caret line="134" selection-start-line="134" selection-end-line="134" />
           <folding>
-            <element signature="e#38#53#0" expanded="true" />
+            <element signature="e#168#181#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/utils/__init__.py">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/main.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="174">
-          <caret line="316" column="35" selection-start-line="316" selection-start-column="26" selection-end-line="316" selection-end-column="35" />
+        <state relative-caret-position="340">
+          <caret line="17" column="42" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
           <folding>
-            <element signature="e#24#39#0" expanded="true" />
+            <element signature="e#0#10#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/utils/helper.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="212">
-          <caret line="96" column="47" selection-start-line="96" selection-start-column="47" selection-end-line="96" selection-end-column="47" />
+        <state relative-caret-position="420">
+          <caret line="21" column="59" selection-start-line="21" selection-start-column="59" selection-end-line="21" selection-end-column="59" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#0#14#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/zhibo.py">
+    <entry file="file://$PROJECT_DIR$/utils/langconv.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="3620">
+          <caret line="182" selection-start-line="182" selection-end-line="182" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/LocalToken.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state>
+          <caret column="48" selection-start-column="19" selection-end-column="48" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/settings.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="136">
-          <caret line="38" column="152" selection-start-line="38" selection-start-column="152" selection-end-line="38" selection-end-column="152" />
+        <state relative-caret-position="483">
+          <caret line="143" column="60" selection-start-line="143" selection-start-column="60" selection-end-line="143" selection-end-column="60" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="980">
+          <caret line="49" column="21" selection-start-line="49" selection-start-column="21" selection-end-line="49" selection-end-column="21" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#0#14#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1440">
+        <state relative-caret-position="356">
+          <caret line="102" column="85" selection-start-line="102" selection-start-column="75" selection-end-line="102" selection-end-column="85" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#33612#33722#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="736">
-          <caret line="110" column="8" selection-start-line="110" selection-start-column="8" selection-end-line="110" selection-end-column="79" />
+        <state relative-caret-position="2388">
+          <caret line="140" column="27" lean-forward="true" selection-start-line="140" selection-start-column="27" selection-end-line="140" selection-end-column="27" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="376">
-          <caret line="123" column="8" selection-start-line="123" selection-start-column="8" selection-end-line="123" selection-end-column="79" />
+        <state relative-caret-position="806">
+          <caret line="43" column="45" lean-forward="true" selection-start-line="43" selection-start-column="45" selection-end-line="43" selection-end-column="45" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
@@ -1571,155 +1530,170 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/pipeline/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="400">
-          <caret line="137" lean-forward="true" selection-start-line="137" selection-end-line="137" />
+        <state relative-caret-position="-438">
+          <caret line="64" column="57" selection-start-line="64" selection-start-column="57" selection-end-line="64" selection-end-column="57" />
           <folding>
             <element signature="e#18#32#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="360">
-          <caret line="24" selection-start-line="24" selection-end-line="24" />
+        <state relative-caret-position="-1879">
+          <caret line="111" column="62" selection-start-line="111" selection-start-column="62" selection-end-line="111" selection-end-column="62" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-178">
-          <caret line="72" column="36" lean-forward="true" selection-start-line="72" selection-start-column="36" selection-end-line="72" selection-end-column="36" />
+        <state relative-caret-position="642">
+          <caret line="107" column="55" selection-start-line="107" selection-start-column="55" selection-end-line="107" selection-end-column="55" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/middlewares.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/ball_func.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="127">
-          <caret line="134" selection-start-line="134" selection-end-line="134" />
+        <state relative-caret-position="360">
+          <caret line="18" column="67" lean-forward="true" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="67" />
           <folding>
-            <element signature="e#168#181#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/__init__.py">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/zhibo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="199">
-          <caret line="139" selection-start-line="139" selection-end-line="139" />
+        <state relative-caret-position="407">
+          <caret line="31" column="13" selection-start-line="31" selection-start-column="8" selection-end-line="31" selection-end-column="65" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#1#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="21">
-          <caret line="20" column="27" lean-forward="true" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="27" />
+        <state relative-caret-position="538">
+          <caret line="33" column="15" selection-start-line="33" selection-start-column="8" selection-end-line="33" selection-end-column="68" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
-            <element signature="e#1096#2661#0" />
-            <element signature="e#2707#31206#0" />
+            <element signature="e#18#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-10516">
-          <caret line="26" column="41" lean-forward="true" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
+        <state relative-caret-position="960">
+          <caret line="48" column="32" lean-forward="true" selection-start-line="48" selection-start-column="32" selection-end-line="48" selection-end-column="32" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
-            <element signature="e#33612#33722#0" />
           </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="-5117">
-          <caret line="16" column="56" selection-start-line="16" selection-start-column="56" selection-end-line="16" selection-end-column="56" />
+        <state relative-caret-position="2120">
+          <caret line="106" column="62" selection-start-line="106" selection-start-column="62" selection-end-line="106" selection-end-column="62" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zhibo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-197">
-          <caret line="47" column="39" lean-forward="true" selection-start-line="47" selection-start-column="39" selection-end-line="47" selection-end-column="39" />
+        <state relative-caret-position="100">
+          <caret line="74" column="36" selection-start-line="74" selection-start-column="36" selection-end-line="74" selection-end-column="36" />
+          <folding>
+            <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_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="335">
-          <caret line="17" column="42" selection-start-line="17" selection-start-column="42" selection-end-line="17" selection-end-column="42" />
+        <state relative-caret-position="320">
+          <caret line="38" column="41" selection-start-line="38" selection-start-column="40" selection-end-line="38" selection-end-column="46" />
           <folding>
-            <element signature="e#0#10#0" expanded="true" />
+            <element signature="e#46#61#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/settings.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="483">
-          <caret line="143" column="60" lean-forward="true" selection-start-line="143" selection-start-column="60" selection-end-line="143" selection-end-column="60" />
+        <state relative-caret-position="265">
+          <caret line="64" column="23" lean-forward="true" selection-start-line="64" selection-start-column="23" selection-end-line="64" selection-end-column="23" />
+          <folding>
+            <element signature="e#24#39#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/helper.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="299">
-          <caret line="21" column="59" selection-start-line="21" selection-start-column="59" selection-end-line="21" selection-end-column="59" />
+        <state relative-caret-position="240">
+          <caret line="69" selection-start-line="69" selection-end-line="70" selection-end-column="66" />
           <folding>
-            <element signature="e#0#14#0" expanded="true" />
+            <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/langconv.py">
+    <entry file="file://$PROJECT_DIR$/change.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="178">
-          <caret line="182" selection-start-line="182" selection-end-line="182" />
+        <state relative-caret-position="300">
+          <caret line="15" column="36" selection-start-line="15" selection-start-column="31" selection-end-line="15" selection-end-column="36" />
+          <folding>
+            <element signature="e#0#11#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/LocalToken.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state>
-          <caret column="48" selection-start-column="19" selection-end-column="48" />
+        <state relative-caret-position="481">
+          <caret line="45" column="81" lean-forward="true" selection-start-line="45" selection-start-column="81" selection-end-line="45" selection-end-column="81" />
+          <folding>
+            <element signature="e#38#53#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2088">
-          <caret line="110" column="21" lean-forward="true" selection-start-line="110" selection-start-column="21" selection-end-line="110" selection-end-column="21" />
+        <state relative-caret-position="-311">
+          <caret line="34" selection-start-line="34" selection-end-line="34" />
           <folding>
-            <element signature="e#18#33#0" expanded="true" />
-            <element signature="e#34479#34589#0" />
+            <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="848">
-          <caret line="49" column="21" lean-forward="true" selection-start-line="49" selection-start-column="21" selection-end-line="49" selection-end-column="21" />
+        <state relative-caret-position="461">
+          <caret line="55" column="31" lean-forward="true" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
           <folding>
-            <element signature="e#0#14#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="401">
+          <caret line="58" column="22" lean-forward="true" selection-start-line="58" selection-start-column="22" selection-end-line="58" selection-end-column="22" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>

+ 4 - 4
hg3535/pipeline/bangqiu.py

@@ -60,7 +60,7 @@ class Bangqiupipeline(object):
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
         ctime = str(datetime.datetime.now().year) + "-" + month + "-" + day + " " + time_game + ":00"
-        us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
+        # us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         # expire_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() + 60))
@@ -105,7 +105,7 @@ class Bangqiupipeline(object):
         """联赛表"""
         last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
 
-        if self.db.bq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.bq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "bq", "title": "league", "source": "hg3535"}
             league_list = []
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
@@ -147,8 +147,8 @@ class Bangqiupipeline(object):
             is_morningplate = 0
             is_stringscene = 0
         """插入赛事表"""
-        match_identity = Helper.genearte_uuid(team_home + team_guest + us_date)
-        if self.db.bq_competition35.find({"match_identity": match_identity, pt_status: 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.bq_competition35.find({"match_id": match_id, pt_status: 1}).count() < 1:
             match_list = []
 
             match_dict = {"game_code": "bq", "title": "match", "source": "hg3535"}

+ 1 - 1
hg3535/pipeline/guanjun.py

@@ -62,7 +62,7 @@ class Guanjunpipeline(object):
             print(ball, "冠军数据球类错误")
             return
         uuid = Helper.genearte_uuid(league_name)
-        if self.db[league_table].find({'uuid': uuid}).count() < 1:
+        if self.db[league_table].find({'lg_id': league_id}).count() < 1:
             league_list = []
             payload_key = ['game_code', 'title', 'lg_id', 'source']
             payload_value = [game_code, 'league', league_id, 'hg3535']

+ 2 - 3
hg3535/pipeline/jieshu.py

@@ -57,9 +57,8 @@ class Jieshuqiupipeline(object):
         status_dict = {"game_code": game_code, "title": "match_status", "source": "hg3535"}
         update = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
         data_list = []
-
-        us_time = '{}-{}-{}'.format(datetime.datetime.now().year, month, day)
-        match_identity = Helper.genearte_uuid(home + away + us_time)
+        # us_time = '{}-{}-{}'.format(datetime.datetime.now().year, month, day)
+        match_identity = Helper.genearte_uuid(home + away + date)
         data = {'match_id': match_id, 'status': ostatus, "is_rollball": 0, "is_today": 0, "is_morningplate": 0,
                 "is_stringscene": 0, "is_horn": 0, 'game_code': game_code, 'update': update,
                 "match_identity": match_identity}

+ 6 - 6
hg3535/pipeline/lanqiu.py

@@ -42,7 +42,7 @@ class Lanqiupipeline(object):
         try:
             data_game = item['data_game'].split("/")
             month = str(data_game[1].strip())
-            day = str(data_game[0]).strip()
+            day = str(data_game[0].strip())
         except Exception as e:
             logger.warning(e)
             data_game = item['data_game'].split(" ")
@@ -50,12 +50,12 @@ class Lanqiupipeline(object):
             month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
                           'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
             month = month_dict[months]
-            day = str(data_game[0]).strip()
+            day = str(data_game[0].strip())
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
         us_time = "2019" + "-" + month + "-" + day + " " + time_game + ":00"
-        us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
+        # us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         pt = str(item['pt'])
@@ -80,7 +80,7 @@ class Lanqiupipeline(object):
         # 让球 数据插入数据库
         """联赛"""
         last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
-        if self.db.lq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.lq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "lq", "title": "league", "source": "hg3535"}
             league_list = []
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
@@ -121,8 +121,8 @@ class Lanqiupipeline(object):
             is_stringscene = 0
         pt_dict = {'1': 'is_today', '2': 'is_morningplate', '3': 'is_stringscene', '4': 'is_rollball'}
         pt_status = pt_dict[str(pt)]
-        match_identity = Helper.genearte_uuid(team_home + team_guest + us_date)
-        if self.db.lq_competition35.find({'match_identity': match_identity, pt_status: 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.lq_competition35.find({'match_id': match_id, pt_status: 1}).count() < 1:
             match_list = []
             match_dict = {"game_code": "lq", "title": "match", "source": "hg3535"}
             match_kay = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time", "tag",

+ 18 - 18
hg3535/pipeline/roll_bangqiu.py

@@ -37,23 +37,23 @@ class Roll_Banqiupipeline(object):
         # 数量(97>)
         tag_number = item['number']
         # 日期
-        try:
-            data_game = item['data_game'].split("/")
-            month = str(data_game[1].strip())
-            day = str(data_game[0]).strip()
-        except Exception as e:
-            logger.warning(e)
-            data_game = item['data_game'].split(" ")
-            months = str(data_game[1].strip())
-            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
-                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
-            month = month_dict[months]
-            day = str(data_game[0]).strip()
-        us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
+        # try:
+        #     data_game = item['data_game'].split("/")
+        #     month = str(data_game[1].strip())
+        #     day = str(data_game[0]).strip()
+        # except Exception as e:
+        #     logger.warning(e)
+        #     data_game = item['data_game'].split(" ")
+        #     months = str(data_game[1].strip())
+        #     month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+        #                   'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+        #     month = month_dict[months]
+        #     day = str(data_game[0]).strip()
+        # us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
-        ctime = "2019" + "-" + month + "-" + day + "" + time_game + ":00".strip()
+        # ctime = "2019" + "-" + month + "-" + day + "" + time_game + ":00".strip()
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         cdate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
@@ -84,7 +84,7 @@ class Roll_Banqiupipeline(object):
         uuid = Helper.genearte_uuid(league_name)
         """联赛"""
         last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
-        if self.db.bq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.bq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "bq", "title": "league", "source": "hg3535"}
             league_list = []
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
@@ -108,8 +108,8 @@ class Roll_Banqiupipeline(object):
         else:
             logger.info('棒球滚球联赛, 已存在不提交')
         """赛事"""
-        match_identity = Helper.genearte_uuid(team_home + team_guest + us_date)
-        if self.db.bq_competition35.find({"match_identity": match_identity, 'is_rollball': 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.bq_competition35.find({"match_id": match_id, 'is_rollball': 1}).count() < 1:
             match_list = []
             match_dict = {"game_code": "bq", "title": "match", "source": "hg3535"}
             match_key = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time",
@@ -226,7 +226,7 @@ class Roll_Banqiupipeline(object):
             "match_score": '', "match_winer": '', "updata_time": '',
             "match_time": time_game, "match_process": jijie,
             "tag": tag_number, "match_id": match_id, "source": 'hg3535',
-            "ctime": ctime, "uuid": uuid, "result_mark": source_dict, "start_time": '', 'warn_more': '',
+            "uuid": uuid, "result_mark": source_dict, "start_time": '', 'warn_more': '',
         }
         da_list.append(bq_rball)
         r_data_dict = {

+ 17 - 17
hg3535/pipeline/roll_lanqiu.py

@@ -39,20 +39,20 @@ class Roll_Lanqiupipeline(object):
         number = item['number']
         # 比赛状态
         result_mark = item['score_dict']
-        try:
-            data_game = item['data_game'].split("/")
-            month = str(data_game[1].strip())
-            day = str(data_game[0]).strip()
-        except Exception as e:
-            logger.warning(e)
-            data_game = item['data_game'].split(" ")
-            months = str(data_game[1].strip())
-            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
-                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
-            month = month_dict[months]
-            day = str(data_game[0]).strip()
-        # 比赛时间
-        us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
+        # try:
+        #     data_game = item['data_game'].split("/")
+        #     month = str(data_game[1].strip())
+        #     day = str(data_game[0]).strip()
+        # except Exception as e:
+        #     logger.warning(e)
+        #     data_game = item['data_game'].split(" ")
+        #     months = str(data_game[1].strip())
+        #     month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+        #                   'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+        #     month = month_dict[months]
+        #     day = str(data_game[0]).strip()
+        # # 比赛时间
+        # us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
         time_game = str(item['time_game'])
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
@@ -80,7 +80,7 @@ class Roll_Lanqiupipeline(object):
         team_scores_dict_rule = item['team_score_rule']
         last_time = "{}-12-31 23:59:59".format(datetime.datetime.now().year)
         uuid = Helper.genearte_uuid(league_name)
-        if self.db.lq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.lq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "lq", "title": "league", "source": "hg3535"}
             league_list = []
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
@@ -103,8 +103,8 @@ class Roll_Lanqiupipeline(object):
                 # logger.warning(league_dict)
         else:
             logger.info('篮球滚球联赛已存在')
-        match_identity = Helper.genearte_uuid(team_home + team_guest + us_date)
-        if self.db.lq_competition35.find({"match_identity": match_identity, 'is_rollball': 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.lq_competition35.find({"match_id": match_id, 'is_rollball': 1}).count() < 1:
             match_list = []
             match_dict = {"game_code": "lq", "title": "match", "source": "hg3535"}
             match_kay = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time",

+ 16 - 16
hg3535/pipeline/roll_wangqiu.py

@@ -42,23 +42,23 @@ class Roll_Wangqiupipeline(object):
         # 日期
         # data_game = item['data_game']
         rule = item['rule']
-        try:
-            data_game = item['data_game'].split("/")
-            month = str(data_game[1].strip())
-            day = str(data_game[0]).strip()
-        except Exception as e:
-            logger.warning(e)
-            data_game = item['data_game'].split(" ")
-            months = str(data_game[1].strip())
-            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
-                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
-            month = month_dict[months]
-            day = str(data_game[0]).strip()
+        # try:
+        #     data_game = item['data_game'].split("/")
+        #     month = str(data_game[1].strip())
+        #     day = str(data_game[0]).strip()
+        # except Exception as e:
+        #     logger.warning(e)
+        #     data_game = item['data_game'].split(" ")
+        #     months = str(data_game[1].strip())
+        #     month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+        #                   'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+        #     month = month_dict[months]
+        #     day = str(data_game[0]).strip()
         # 比赛时间
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
         # ctime = "2019" + "-" + month + "-" + day + "" + time_game + ":00"
-        us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
+        # us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         cdate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
@@ -95,7 +95,7 @@ class Roll_Wangqiupipeline(object):
         """联赛"""
         last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
 
-        if self.db.wq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.wq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "wq", "title": "league", "source": "hg3535"}
             league_list = []
 
@@ -121,8 +121,8 @@ class Roll_Wangqiupipeline(object):
             logger.info('网球联赛已存在, 不提交')
 
         """赛事"""
-        match_identity = Helper.genearte_uuid(team_home + team_guest + us_date)
-        if self.db.wq_competition35.find({"match_identity": match_identity, 'is_rollball': 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.wq_competition35.find({"match_id": match_id, 'is_rollball': 1}).count() < 1:
             match_list = []
             match_dict = {"game_code": "wq", "title": "match", "source": "hg3535"}
             match_key = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time",

+ 17 - 17
hg3535/pipeline/roll_zuqiu.py

@@ -33,19 +33,19 @@ class Roll_Zuqiupipeline(object):
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         cdate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
-        try:
-            data_game = item['data_game'].split("/")
-            month = str(data_game[1].strip())
-            day = str(data_game[0]).strip()
-        except Exception as e:
-            logger.warning(e)
-            data_game = item['data_game'].split(" ")
-            months = str(data_game[1].strip())
-            month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
-                          'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
-            month = month_dict[months]
-            day = str(data_game[0]).strip()
-        us_date = '{}-{}-{}'.format(datetime.datetime.now().year, month, day)
+        # try:
+        #     data_game = item['data_game'].split("/")
+        #     month = str(data_game[1].strip())
+        #     day = str(data_game[0]).strip()
+        # except Exception as e:
+        #     logger.warning(e)
+        #     data_game = item['data_game'].split(" ")
+        #     months = str(data_game[1].strip())
+        #     month_dict = {'Jan': '01', 'Feb': '02', 'Mar': '03', 'Apr': '04', 'May': '05', 'Jun': '06', 'Jul': '07',
+        #                   'Aug': '08', 'Sep': '09', 'Oct': '10', 'Nov': '11', 'Dec': '12'}
+        #     month = month_dict[months]
+        #     day = str(data_game[0]).strip()
+        # us_date = '{}-{}-{}'.format(datetime.datetime.now().year, month, day)
         match_date = cdate.split(' ')[0]
         match_time = cdate.split(' ')[1]
         # 比赛id
@@ -68,8 +68,8 @@ class Roll_Zuqiupipeline(object):
         last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
         league_list = []
         uuid = Helper.genearte_uuid(league_name)
-        horn_team = item['horn_team']
-        if self.db.zq_league35.find({'uuid': uuid}).count() < 1:
+        # horn_team = item['horn_team']
+        if self.db.zq_league35.find({'lg_id': league_id}).count() < 1:
             league_dict = {"game_code": "zq", "title": "league", "source": "hg3535"}
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
             league_value = [league_name, "1", "1", "0", last_time, league_id, "hg3535", uuid]
@@ -90,8 +90,8 @@ class Roll_Zuqiupipeline(object):
                 logger.warning(league_dict)
         else:
             logger.info('足球滚球联赛已存在, 不存在')
-        match_identity = Helper.genearte_uuid(team_home + team_guest + us_date)
-        if self.db.zq_competition35.find({"match_identity": match_identity, 'is_rollball': 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.zq_competition35.find({"match_id": match_id, 'is_rollball': 1}).count() < 1:
             match_list = []
             match_dict = {"game_code": "zq", "title": "match", "source": "hg3535"}
             match_kay = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time",

+ 7 - 5
hg3535/pipeline/wangqiu.py

@@ -63,10 +63,10 @@ class Wangqiupipeline(object):
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
         ctime = str(year) + "-" + month + "-" + day + " " + time_game + ":00"
-        r_ctime = str(year) + "-" + month + "-" + day
+        # r_ctime = str(year) + "-" + month + "-" + day
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
-        expire_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() + 60))
+        # expire_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() + 60))
         # 队1分数
         # score_home = item['score_home']
         # 队2分数
@@ -98,7 +98,8 @@ class Wangqiupipeline(object):
         """联赛"""
         last_time = '{}-12-31 23:59:59'.format(year)
 
-        if self.db.wq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.wq_league35.find({'lg_id': league_id}).count() < 1:
+        # if self.db.wq_league35.find({'uuid': uuid}).count() < 1:
             league_dict = {"game_code": "wq", "title": "league", "source": "hg3535"}
             league_list = []
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
@@ -140,8 +141,9 @@ class Wangqiupipeline(object):
             is_rollball = 0
             is_morningplate = 0
             is_stringscene = 0
-        match_identity = Helper.genearte_uuid(team_home + team_guest + r_ctime)
-        if self.db.wq_competition35.find({'match_identity': match_identity, pt_status: 1}).count() < 1:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.wq_competition35.find({'match_id': match_id, pt_status: 1}).count() < 1:
+        # if self.db.wq_competition35.find({'match_identity': match_identity, pt_status: 1}).count() < 1:
             match_list = []
             match_dict = {"game_code": "wq", "title": "match", "source": "hg3535"}
             match_key = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time",

+ 4 - 7
hg3535/pipeline/zhibo.py

@@ -1,5 +1,3 @@
-import datetime
-
 import pymongo
 import time
 import logging
@@ -21,18 +19,17 @@ class Zuqiupipeline(object):
         out = defer.Deferred()
         reactor.callInThread(self._do_calculation, item, out)
         yield out
-        defer.returnValue(item)
+        # defer.returnValue(item)
 
     # def process_item(self, item, spider):
     def _do_calculation(self, item, out):
         logger = logging.getLogger(__name__)
         detail_datas = item['detail']
         mid = item['mid']
-        date = item['date'].split("/")
+        date = item['date']
         home = item['home']
         away = item['away']
-        year = datetime.datetime.now().year
-        us_date = '{}-{}-{}'.format(year, date[1], date[0])
+        us_date = time.strftime('%Y-%m-%d', time.localtime(date))
         match_identity = Helper.genearte_uuid(home + away + us_date)
         warns = []
         up_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
@@ -46,7 +43,7 @@ class Zuqiupipeline(object):
             warn_dict['data'] = warns
             res = Helper.async_post(MATCHWARN, warn_dict)
             if res.get('status') == 1:
-                print('危险球提交成功')
+                # print('危险球提交成功')
                 self.db.FT_warn35.insert(warn_dict)
                 logger.info('足球直播危险球提交成功, {}'.format(res))
             else:

+ 8 - 9
hg3535/pipeline/zuqiu.py

@@ -10,8 +10,6 @@ from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODD
 
 class Zuqiupipeline(object):
     def open_spider(self, spider):
-        # self.connection = AsyncIOMotorClient("mongodb://{}:{}@{}:{}/database?authSource={}".format('kaiyou', 'kaiyou', '192.168.2.200', 27017, 'kaiyou'))
-        # session = aiohttp.ClientSession()
         self.mongo = pymongo.MongoClient(host=M_HOST, username=M_USER, password=M_PASSWORD, port=M_POST, authSource=M_DB)
         self.db = self.mongo[M_DB]
 
@@ -29,7 +27,7 @@ class Zuqiupipeline(object):
         try:
             data_game = item['data_game'].split("/")
             month = str(data_game[1].strip())
-            day = str(data_game[0]).strip()
+            day = str(data_game[0].strip())
         except Exception as e:
             logger.warning(e)
             data_game = item['data_game'].split(" ")
@@ -43,7 +41,8 @@ class Zuqiupipeline(object):
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
         us_time = str(datetime.datetime.now().year) + "-" + month + "-" + day + " " + time_game + ":00"
-        new_us_time = us_time.split(' ')[0]
+        # 美东日期
+        # new_us_time = us_time.split(' ')[0]
         # 现在时间,时间戳
         utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         # 比赛id
@@ -65,8 +64,8 @@ class Zuqiupipeline(object):
         league_list = []
         # uuid = Helper.genearte_uuid(league_name + 'hg3535')
         uuid = Helper.genearte_uuid(league_name)
-        # if self.db.zq_league35.find({'lg_id': league_id}).count() < 1:
-        if self.db.zq_league35.find({'uuid': uuid}).count() < 1:
+        if self.db.zq_league35.find({'lg_id': league_id}).count() < 1:
+        # if self.db.zq_league35.find({'uuid': uuid}).count() < 1:
             league_dict = {"game_code": "zq", "title": "league", "source": "hg3535"}
             league_key = ["name_chinese", "kind", "match_mode", "if_stop", "last_time", "lg_id", "source", "uuid"]
             league_value = [league_name, "1", "1", "0", last_time, league_id, "hg3535", uuid]
@@ -100,9 +99,9 @@ class Zuqiupipeline(object):
             is_stringscene = 0
 
         match_list = []
-        # if self.db.zq_competition35.find({'match_id': match_id, pt_status: 1}).count() < 1:
-        match_identity = Helper.genearte_uuid(team_home + team_guest + new_us_time)
-        if self.db.zq_competition35.find({'match_identity': match_identity, pt_status: 1}).count() < 1:
+        if self.db.zq_competition35.find({'match_id': match_id, pt_status: 1}).count() < 1:
+            match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        # if self.db.zq_competition35.find({'match_identity': match_identity, pt_status: 1}).count() < 1:
             match_dict = {"game_code": "zq", "title": "match", "source": "hg3535"}
             match_kay = ["home_team", "guest_team", "lg_id", "status", "match_id", "match_date", "match_time",
                          "tag", "source", "is_rollball", "is_morningplate", "is_stringscene", "us_time", "uuid",

+ 8 - 5
hg3535/spiders/jieshu.py

@@ -24,17 +24,18 @@ class HgjieshuSpider(scrapy.Spider):
     rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def start_requests(self):
-        match_ids = self.rls.smembers("hg3535.gunqiu.ids")
+        match_ids = self.rls.hgetall("hg3535.GunQiu.ids")
         if match_ids:
-            for match_id in match_ids:
-                match_id = match_id.decode()
+            for match_id, ctime in match_ids.items():
+                match_id, ctime = match_id.decode(), ctime.decode()
                 url = 'https://odata.yonghuai5515.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(match_id)
-                yield scrapy.Request(url=url, callback=self.parse, dont_filter=True)
+                yield scrapy.Request(url=url, callback=self.parse, dont_filter=True, meta={'ctime': ctime})
         # url = 'https://odata.yonghuai5515.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(3560310)
         # yield scrapy.Request(url=url, callback=self.parse, dont_filter=True)
 
     def parse(self, response):
         logger = logging.getLogger(__name__)
+        ctime = response.meta['ctime']
         try:
             data = json.loads(response.text)
             status = data['i'][0]
@@ -43,7 +44,9 @@ class HgjieshuSpider(scrapy.Spider):
             match_id = data['i'][2]
             home = data['eg']['es'][0]['i'][0]
             away = data['eg']['es'][0]['i'][1]
-            date = data['eg']['es'][0]['i'][4]
+            # date = data['eg']['es'][0]['i'][4]
+            # match_time = data['eg']['es'][0]['i'][5]
+            date = ctime
             item = Hgjieshu()
             item['ball'] = ball
             item['match_id'] = match_id

+ 5 - 3
hg3535/spiders/roll_bangqiu.py

@@ -32,9 +32,11 @@ class BqrangqiuSpider(scrapy.Spider):
             for i in ids:
                 urls = 'https://odata.yonghuai5515.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)
+                # self.rls.sadd('hg3535.gunqiu.ids', i)
+                # up_time = str(time.time()) + '&' + 'bq'
+                # self.rls.hset('hg3535.ball.ids', i, up_time)
+                creation = time.strftime('%Y-%m-%d', time.localtime())
+                self.rls.hsetnx('hg3535.GunQiu.ids', i, creation)
                 yield Request(url=urls, callback=self.parse_each, dont_filter=True)
 
     def parse_each(self, response):

+ 5 - 3
hg3535/spiders/roll_lanqiu.py

@@ -67,9 +67,11 @@ class LanqiuSpider(scrapy.Spider):
                         es = es['es']
                         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)
+                            # self.rls.sadd('hg3535.gunqiu.ids', match_id)
+                            # up_time = str(time.time()) + '&' + 'lq'
+                            # self.rls.hset('hg3535.ball.ids', match_id, up_time)
+                            creation = time.strftime('%Y-%m-%d', time.localtime())
+                            self.rls.hsetnx('hg3535.GunQiu.ids', match_id, creation)
                             url = 'https://odata.yonghuai5515.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:

+ 4 - 2
hg3535/spiders/roll_wangqiu.py

@@ -65,8 +65,10 @@ 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)
+                # up_time = str(time.time()) + '&' + 'wq'
+                # self.rls.hset('hg3535.ball.ids', id, up_time)
+                creation = time.strftime('%Y-%m-%d', time.localtime())
+                self.rls.hsetnx('hg3535.GunQiu.ids', id, creation)
                 yield Request(url=urls, callback=self.parse_other, meta={'rule': rle}, dont_filter=True)
 
     def parse_other(self, response):

+ 5 - 5
hg3535/spiders/roll_zuqiu.py

@@ -2,10 +2,8 @@
 # import copy
 import datetime
 import json
-
 # import jsonpath
 import time
-
 import redis
 import scrapy
 from scrapy.http import Request
@@ -42,9 +40,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)
+                            # up_time = str(time.time()) + '&' + 'zq'
+                            # self.rls.sadd('hg3535.gunqiu.ids', match_id)
+                            creation = time.strftime('%Y-%m-%d', time.localtime())
+                            # self.rls.hset('hg3535.ball.ids', match_id, up_time)
+                            self.rls.hsetnx('hg3535.GunQiu.ids', match_id, creation)
                             url = 'https://odata.yonghuai5515.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)
                 else:

+ 1 - 1
hg3535/spiders/zhibo.py

@@ -72,7 +72,7 @@ class ZuqiuSpider(scrapy.Spider):
                 # print(e)
                 return
             match_dict = match['teams']
-            date = match['_dt']['date']
+            date = match['_dt']['uts']
             home = match_dict['home']['name']
             away = match_dict['away']['name']
             match_events = match_data['data']['events']