2
0

10 Коммиты ac8003828e ... 804f98f46f

Автор SHA1 Сообщение Дата
  Your Name 804f98f46f 添加危险球类型 6 лет назад
  Your Name 003af509e3 添加危险球类型 6 лет назад
  Your Name 96ed787c2e 添加危险球类型 6 лет назад
  Your Name 658d7ecacc 添加危险球类型 6 лет назад
  Your Name f39c886642 修改赛事时间不一致 6 лет назад
  Your Name 7e7c32b4bb 修改赛事时间不一致 6 лет назад
  Your Name 646409aba5 添加token重新获取 6 лет назад
  Your Name 01b051f916 添加token重新获取 6 лет назад
  Your Name 47ccd7e6b1 添加token重新获取 6 лет назад
  Your Name 55db796e0f 添加token重新获取 6 лет назад

+ 448 - 445
hg3535/.idea/workspace.xml

@@ -2,25 +2,30 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="7fa42e97-ddea-4404-91db-5a9ccc162649" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/utils/langconv.py" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/utils/zh_wiki.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/items.py" beforeDir="false" afterPath="$PROJECT_DIR$/items.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pipeline/ball_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/ball_func.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/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/saiguo.py" beforeDir="false" afterPath="$PROJECT_DIR$/pipeline/saiguo.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/bangqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/bangqiu.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/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_lanqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/roll_lanqiu.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/saiguo.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/saiguo.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/zhibo.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/zhibo.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/utils/helper.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/helper.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/spiders/zuqiu.py" beforeDir="false" afterPath="$PROJECT_DIR$/spiders/zuqiu.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
@@ -30,7 +35,7 @@
   </component>
   <component name="CoverageDataManager">
     <SUITE FILE_PATH="coverage/hg3535$items.coverage" NAME="items Coverage Results" MODIFIED="1554291398794" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
-    <SUITE FILE_PATH="coverage/hg3535$main.coverage" NAME="main Coverage Results" MODIFIED="1571535369965" 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="1572676605765" 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="1567749757856" 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" />
@@ -60,120 +65,108 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <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="20">
-              <caret line="20" selection-start-line="20" selection-end-line="21" />
+            <state relative-caret-position="60">
+              <caret line="3" column="11" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/main.py">
+        <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="280">
-              <caret line="14" column="44" lean-forward="true" selection-start-line="14" selection-start-column="44" selection-end-line="14" selection-end-column="44" />
-              <folding>
-                <element signature="e#0#10#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="80">
+              <caret line="4" column="11" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="11" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1680">
-              <caret line="123" column="8" selection-start-line="123" selection-start-column="8" selection-end-line="123" selection-end-column="79" />
-              <folding>
-                <element signature="e#0#15#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="80">
+              <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
             </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_lanqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="11369">
-              <caret line="591" selection-start-line="591" selection-end-line="710" selection-end-column="72" />
-              <folding>
-                <element signature="e#18#33#0" expanded="true" />
-                <element signature="e#34479#34589#0" />
-              </folding>
+            <state relative-caret-position="40">
+              <caret line="2" column="11" selection-start-line="2" selection-start-column="11" selection-end-line="2" selection-end-column="11" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-660">
-              <caret lean-forward="true" />
+            <state relative-caret-position="5680">
+              <caret line="323" column="31" selection-start-line="323" selection-start-column="26" selection-end-line="323" selection-end-column="31" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
+                <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/wangqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="740">
-              <caret line="73" column="13" lean-forward="true" selection-start-line="73" selection-start-column="13" selection-end-line="73" selection-end-column="13" />
+            <state relative-caret-position="20">
+              <caret line="1" selection-start-line="1" selection-end-line="1" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
+                <element signature="e#38#53#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1566">
-              <caret line="103" column="8" selection-start-line="103" selection-start-column="8" selection-end-line="103" selection-end-column="83" />
+            <state relative-caret-position="40">
+              <caret line="2" selection-start-line="2" selection-end-line="2" />
               <folding>
                 <element signature="e#0#15#0" expanded="true" />
-                <element signature="e#33612#33722#0" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/roll_bangqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1660">
-              <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="20">
+              <caret line="1" selection-start-line="1" selection-end-line="1" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
+                <element signature="e#48#59#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/zhibo.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="125">
-              <caret line="44" column="43" selection-start-line="44" selection-start-column="43" selection-end-line="44" selection-end-column="43" />
+            <state relative-caret-position="40">
+              <caret line="2" selection-start-line="2" selection-end-line="2" />
               <folding>
-                <element signature="e#0#15#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/bangqiu.py">
+        <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="282">
-              <caret line="57" column="43" selection-start-line="57" selection-start-column="43" selection-end-line="57" selection-end-column="43" />
+            <state>
+              <caret line="12" selection-start-line="12" selection-end-line="12" />
               <folding>
-                <element signature="e#0#15#0" expanded="true" />
-                <element signature="e#9361#9373#0" />
+                <element signature="e#24#35#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -190,17 +183,8 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>triangle</find>
-      <find>match_score_dict</find>
-      <find>南美自由杯2019</find>
-      <find>爱尔兰甲组联赛2019</find>
-      <find>爱尔兰甲组联赛</find>
-      <find>corner_ball</find>
-      <find>Hgjieshu</find>
-      <find>total_size</find>
       <find>p_code</find>
       <find>3438017</find>
-      <find>utime</find>
       <find>team_scores_dict</find>
       <find>total_sizes_dict</find>
       <find>last_home_dict</find>
@@ -220,6 +204,15 @@
       <find>match_process</find>
       <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>
+      <find>篮球滚球详细赔率列表, 不提交</find>
+      <find>full_dict_rules_data</find>
+      <find>utime</find>
+      <find>jijie</find>
     </findStrings>
     <replaceStrings>
       <replace>&quot;&quot;</replace>
@@ -274,13 +267,6 @@
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/spiders/hg3535_zuqiu.py" />
-        <option value="$PROJECT_DIR$/spiders/hg3535_zq_status.py" />
-        <option value="$PROJECT_DIR$/spiders/kaishi.py" />
-        <option value="$PROJECT_DIR$/kaishi.py" />
-        <option value="$PROJECT_DIR$/main_notroll.py" />
-        <option value="$PROJECT_DIR$/text.py" />
-        <option value="$PROJECT_DIR$/spiders/hg3535_zq_status_up.py" />
         <option value="$PROJECT_DIR$/spiders/hgjieshu.py" />
         <option value="$PROJECT_DIR$/spiders/hg3535_bangqiu.py" />
         <option value="$PROJECT_DIR$/spiders/hg3535_lanqiu.py" />
@@ -292,47 +278,54 @@
         <option value="$PROJECT_DIR$/spiders/zq_jieshu.py" />
         <option value="$PROJECT_DIR$/.gitignore" />
         <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$/pipeline/guanjun.py" />
-        <option value="$PROJECT_DIR$/spiders/saiguo.py" />
         <option value="$PROJECT_DIR$/middlewares.py" />
-        <option value="$PROJECT_DIR$/pipeline/ball_func.py" />
         <option value="$PROJECT_DIR$/pipelines.py" />
-        <option value="$PROJECT_DIR$/settings.py" />
-        <option value="$PROJECT_DIR$/pipeline/saiguo.py" />
-        <option value="$PROJECT_DIR$/utils/helper.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$/pipeline/jieshu.py" />
+        <option value="$PROJECT_DIR$/utils/helper.py" />
+        <option value="$PROJECT_DIR$/proj/celerys.py" />
+        <option value="$PROJECT_DIR$/proj/config.py" />
+        <option value="$PROJECT_DIR$/proj/celeryconfig" />
+        <option value="$PROJECT_DIR$/proj/tasks.py" />
+        <option value="$PROJECT_DIR$/proj/celeryconfig.py" />
+        <option value="$PROJECT_DIR$/proj/celery.py" />
+        <option value="$PROJECT_DIR$/utils/LocalToken.py" />
+        <option value="$PROJECT_DIR$/settings.py" />
+        <option value="$PROJECT_DIR$/main.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_bangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_wangqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/zuqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/zhibo.py" />
         <option value="$PROJECT_DIR$/pipeline/wangqiu.py" />
-        <option value="$PROJECT_DIR$/main.py" />
-        <option value="$PROJECT_DIR$/spiders/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/saiguo.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/bangqiu.py" />
         <option value="$PROJECT_DIR$/pipeline/lanqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/jieshu.py" />
+        <option value="$PROJECT_DIR$/pipeline/guanjun.py" />
+        <option value="$PROJECT_DIR$/pipeline/bangqiu.py" />
+        <option value="$PROJECT_DIR$/pipeline/ball_func.py" />
+        <option value="$PROJECT_DIR$/spiders/bangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/guanjun.py" />
+        <option value="$PROJECT_DIR$/spiders/jieshu.py" />
+        <option value="$PROJECT_DIR$/spiders/lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_lanqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/roll_zuqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/saiguo.py" />
+        <option value="$PROJECT_DIR$/spiders/wangqiu.py" />
+        <option value="$PROJECT_DIR$/spiders/zhibo.py" />
+        <option value="$PROJECT_DIR$/spiders/zuqiu.py" />
       </list>
     </option>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-237" />
-    <option name="y" value="84" />
-    <option name="width" value="1177" />
-    <option name="height" value="916" />
+    <option name="x" value="77" />
+    <option name="y" value="219" />
+    <option name="width" value="1216" />
+    <option name="height" value="881" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -340,6 +333,7 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -357,16 +351,10 @@
               <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>
       </pane>
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -378,16 +366,16 @@
     <property name="settings.editor.selected.configurable" value="editor.preferences.fonts.default" />
   </component>
   <component name="RecentsManager">
+    <key name="MoveFile.RECENT_KEYS">
+      <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535" />
+      <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535\spiders" />
+    </key>
     <key name="CopyFile.RECENT_KEYS">
       <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535\utils" />
       <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535\pipeline" />
       <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535\spiders" />
       <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535" />
     </key>
-    <key name="MoveFile.RECENT_KEYS">
-      <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535" />
-      <recent name="C:\Users\admin\Desktop\sports_scrapy\hg3535\spiders" />
-    </key>
   </component>
   <component name="RunDashboard">
     <option name="ruleStates">
@@ -689,77 +677,25 @@
       <workItem from="1571117630847" duration="45191000" />
       <workItem from="1571447932869" duration="617000" />
       <workItem from="1571457369771" duration="2103000" />
-      <workItem from="1571476585522" duration="6253000" />
-    </task>
-    <task id="LOCAL-00061" summary="更新篮球, 父级玩法错误">
-      <created>1568021587755</created>
-      <option name="number" value="00061" />
-      <option name="presentableId" value="LOCAL-00061" />
-      <option name="project" value="LOCAL" />
-      <updated>1568021587755</updated>
-    </task>
-    <task id="LOCAL-00062" summary="更新篮球, 父级玩法错误">
-      <created>1568026066857</created>
-      <option name="number" value="00062" />
-      <option name="presentableId" value="LOCAL-00062" />
-      <option name="project" value="LOCAL" />
-      <updated>1568026066858</updated>
-    </task>
-    <task id="LOCAL-00063" summary="更新篮球, 父级玩法错误">
-      <created>1568033844142</created>
-      <option name="number" value="00063" />
-      <option name="presentableId" value="LOCAL-00063" />
-      <option name="project" value="LOCAL" />
-      <updated>1568033844142</updated>
-    </task>
-    <task id="LOCAL-00064" summary="更新篮球, 父级玩法错误">
-      <created>1568077379445</created>
-      <option name="number" value="00064" />
-      <option name="presentableId" value="LOCAL-00064" />
-      <option name="project" value="LOCAL" />
-      <updated>1568077379445</updated>
-    </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>
-    </task>
-    <task id="LOCAL-00066" summary="更新篮球, 父级玩法错误">
-      <created>1568083734500</created>
-      <option name="number" value="00066" />
-      <option name="presentableId" value="LOCAL-00066" />
-      <option name="project" value="LOCAL" />
-      <updated>1568083734501</updated>
-    </task>
-    <task id="LOCAL-00067" summary="更新">
-      <created>1568083846357</created>
-      <option name="number" value="00067" />
-      <option name="presentableId" value="LOCAL-00067" />
-      <option name="project" value="LOCAL" />
-      <updated>1568083846357</updated>
-    </task>
-    <task id="LOCAL-00068" summary="更新">
-      <created>1568084349753</created>
-      <option name="number" value="00068" />
-      <option name="presentableId" value="LOCAL-00068" />
-      <option name="project" value="LOCAL" />
-      <updated>1568084349753</updated>
-    </task>
-    <task id="LOCAL-00069" summary="更新">
-      <created>1568110761947</created>
-      <option name="number" value="00069" />
-      <option name="presentableId" value="LOCAL-00069" />
-      <option name="project" value="LOCAL" />
-      <updated>1568110761947</updated>
-    </task>
-    <task id="LOCAL-00070" summary="更新">
-      <created>1568112864503</created>
-      <option name="number" value="00070" />
-      <option name="presentableId" value="LOCAL-00070" />
-      <option name="project" value="LOCAL" />
-      <updated>1568112864503</updated>
+      <workItem from="1571476585522" duration="6394000" />
+      <workItem from="1571621462229" duration="13387000" />
+      <workItem from="1571651573898" duration="915000" />
+      <workItem from="1571710042121" duration="15268000" />
+      <workItem from="1571967657305" duration="24271000" />
+      <workItem from="1572054552404" duration="91000" />
+      <workItem from="1572071466803" duration="820000" />
+      <workItem from="1572074972320" duration="610000" />
+      <workItem from="1572075652124" duration="11000" />
+      <workItem from="1572405874406" duration="1841000" />
+      <workItem from="1572426136037" duration="1509000" />
+      <workItem from="1572431428343" duration="376000" />
+      <workItem from="1572434825450" duration="4167000" />
+      <workItem from="1572676469541" duration="2133000" />
+      <workItem from="1573009752102" duration="3351000" />
+      <workItem from="1573034858244" duration="664000" />
+      <workItem from="1573041285410" duration="939000" />
+      <workItem from="1573090124717" duration="596000" />
+      <workItem from="1573200066023" duration="346000" />
     </task>
     <task id="LOCAL-00071" summary="更新">
       <created>1568112995602</created>
@@ -1034,11 +970,81 @@
       <option name="project" value="LOCAL" />
       <updated>1571362924906</updated>
     </task>
-    <option name="localTasksCounter" value="110" />
+    <task id="LOCAL-00110" summary="赛事合并">
+      <created>1571538015173</created>
+      <option name="number" value="00110" />
+      <option name="presentableId" value="LOCAL-00110" />
+      <option name="project" value="LOCAL" />
+      <updated>1571538015174</updated>
+    </task>
+    <task id="LOCAL-00111" summary="添加token重新获取">
+      <created>1571637623087</created>
+      <option name="number" value="00111" />
+      <option name="presentableId" value="LOCAL-00111" />
+      <option name="project" value="LOCAL" />
+      <updated>1571637623088</updated>
+    </task>
+    <task id="LOCAL-00112" summary="添加token重新获取">
+      <created>1571647953183</created>
+      <option name="number" value="00112" />
+      <option name="presentableId" value="LOCAL-00112" />
+      <option name="project" value="LOCAL" />
+      <updated>1571647953183</updated>
+    </task>
+    <task id="LOCAL-00113" summary="添加token重新获取">
+      <created>1571648482002</created>
+      <option name="number" value="00113" />
+      <option name="presentableId" value="LOCAL-00113" />
+      <option name="project" value="LOCAL" />
+      <updated>1571648482002</updated>
+    </task>
+    <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>
+    <task id="LOCAL-00115" summary="修改赛事时间不一致">
+      <created>1571729040857</created>
+      <option name="number" value="00115" />
+      <option name="presentableId" value="LOCAL-00115" />
+      <option name="project" value="LOCAL" />
+      <updated>1571729040857</updated>
+    </task>
+    <task id="LOCAL-00116" summary="修改赛事时间不一致">
+      <created>1571735666701</created>
+      <option name="number" value="00116" />
+      <option name="presentableId" value="LOCAL-00116" />
+      <option name="project" value="LOCAL" />
+      <updated>1571735666702</updated>
+    </task>
+    <task id="LOCAL-00117" summary="添加危险球类型">
+      <created>1572054605275</created>
+      <option name="number" value="00117" />
+      <option name="presentableId" value="LOCAL-00117" />
+      <option name="project" value="LOCAL" />
+      <updated>1572054605275</updated>
+    </task>
+    <task id="LOCAL-00118" summary="添加危险球类型">
+      <created>1572074983723</created>
+      <option name="number" value="00118" />
+      <option name="presentableId" value="LOCAL-00118" />
+      <option name="project" value="LOCAL" />
+      <updated>1572074983723</updated>
+    </task>
+    <task id="LOCAL-00119" summary="添加危险球类型">
+      <created>1573011671870</created>
+      <option name="number" value="00119" />
+      <option name="presentableId" value="LOCAL-00119" />
+      <option name="project" value="LOCAL" />
+      <updated>1573011671871</updated>
+    </task>
+    <option name="localTasksCounter" value="120" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="2098122000" />
+    <option name="totallyTimeSpent" value="2169558000" />
   </component>
   <component name="TodoView">
     <todo-panel id="selected-file">
@@ -1053,12 +1059,12 @@
     <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.14179105" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.71173847" visible="true" weight="0.0836887" />
       <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.49573562" visible="true" weight="0.31866953" />
+      <window_info anchor="bottom" id="Find" order="1" weight="0.3264516" />
+      <window_info anchor="bottom" id="Debug" order="2" sideWeight="0.49573562" weight="0.24678111" />
       <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" />
@@ -1066,9 +1072,9 @@
       <window_info anchor="bottom" id="Version Control" order="7" weight="0.1555794" />
       <window_info anchor="bottom" id="Database Changes" order="8" />
       <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.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.15987125" />
-      <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.50858366" />
-      <window_info anchor="bottom" id="Run" order="12" sideWeight="0.87473345" weight="0.32403433" />
+      <window_info anchor="bottom" x="22" y="376" width="1876" height="298" id="Terminal" order="10" sideWeight="0.49307036" visible="true" weight="0.17811158" />
+      <window_info anchor="bottom" id="Python Console" order="11" sideWeight="0.49946696" weight="0.3143777" />
+      <window_info anchor="bottom" id="Run" order="12" sideWeight="0.87473345" weight="0.34002677" />
       <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" />
@@ -1151,10 +1157,6 @@
     </option>
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="修改棒球,联赛无法写入" />
-    <MESSAGE value="修改冠军,联赛url" />
-    <MESSAGE value="不启用,scrapy_deltafetch" />
-    <MESSAGE value="修改棒球联赛表写入错误" />
     <MESSAGE value="修改冠军" />
     <MESSAGE value="联赛添加redis测试" />
     <MESSAGE value="联赛添加冠军,联赛过滤" />
@@ -1176,7 +1178,11 @@
     <MESSAGE value="修改网球赛果提交错误" />
     <MESSAGE value="修改角球赛事赔率" />
     <MESSAGE value="更新" />
-    <option name="LAST_COMMIT_MESSAGE" value="更新" />
+    <MESSAGE value="赛事合并" />
+    <MESSAGE value="添加token重新获取" />
+    <MESSAGE value="修改赛事时间不一致" />
+    <MESSAGE value="添加危险球类型" />
+    <option name="LAST_COMMIT_MESSAGE" value="添加危险球类型" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
@@ -1186,54 +1192,29 @@
           <line>84</line>
           <option name="timeStamp" value="4" />
         </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
-          <line>205</line>
-          <option name="timeStamp" value="65" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_wangqiu.py</url>
-          <line>278</line>
+          <line>265</line>
           <option name="timeStamp" value="71" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_lanqiu.py</url>
-          <line>63</line>
+          <line>62</line>
           <option name="timeStamp" value="132" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_bangqiu.py</url>
-          <line>263</line>
+          <line>262</line>
           <option name="timeStamp" value="167" />
         </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/spiders/zuqiu.py</url>
-          <line>409</line>
-          <option name="timeStamp" value="190" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/spiders/zuqiu.py</url>
-          <line>558</line>
-          <option name="timeStamp" value="200" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/lanqiu.py</url>
-          <line>236</line>
-          <option name="timeStamp" value="252" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/pipeline/lanqiu.py</url>
-          <line>207</line>
-          <option name="timeStamp" value="263" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_bangqiu.py</url>
-          <line>122</line>
+          <line>108</line>
           <option name="timeStamp" value="265" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_bangqiu.py</url>
-          <line>125</line>
+          <line>111</line>
           <option name="timeStamp" value="266" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -1243,73 +1224,138 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/roll_lanqiu.py</url>
-          <line>80</line>
+          <line>78</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>84</line>
           <option name="timeStamp" value="271" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/guanjun.py</url>
-          <line>122</line>
+          <line>124</line>
           <option name="timeStamp" value="273" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
-          <line>117</line>
+          <line>105</line>
           <option name="timeStamp" value="279" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/spiders/zhibo.py</url>
-          <line>104</line>
+          <line>107</line>
           <option name="timeStamp" value="289" />
         </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>63</line>
+          <option name="timeStamp" value="298" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/utils/helper.py</url>
-          <line>23</line>
-          <option name="timeStamp" value="295" />
+          <url>file://$PROJECT_DIR$/pipeline/zuqiu.py</url>
+          <line>556</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>559</line>
+          <option name="timeStamp" value="315" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/lanqiu.py</url>
+          <line>91</line>
+          <option name="timeStamp" value="317" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/lanqiu.py</url>
+          <line>136</line>
+          <option name="timeStamp" value="318" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/lanqiu.py</url>
+          <line>270</line>
+          <option name="timeStamp" value="319" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/utils/helper.py</url>
-          <line>17</line>
-          <option name="timeStamp" value="297" />
+          <line>12</line>
+          <option name="timeStamp" value="321" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>244</line>
+          <option name="timeStamp" value="322" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>58</line>
+          <option name="timeStamp" value="323" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>59</line>
+          <option name="timeStamp" value="324" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>60</line>
+          <option name="timeStamp" value="325" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>124</line>
+          <option name="timeStamp" value="326" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/jieshu.py</url>
-          <line>66</line>
-          <option name="timeStamp" value="298" />
+          <line>65</line>
+          <option name="timeStamp" value="327" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/spiders/saiguo.py</url>
-          <line>24</line>
-          <option name="timeStamp" value="299" />
+          <url>file://$PROJECT_DIR$/spiders/zuqiu.py</url>
+          <line>109</line>
+          <option name="timeStamp" value="328" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/spiders/zuqiu.py</url>
+          <line>111</line>
+          <option name="timeStamp" value="329" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/spiders/jieshu.py</url>
+          <line>27</line>
+          <option name="timeStamp" value="330" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/spiders/saiguo.py</url>
-          <line>29</line>
-          <option name="timeStamp" value="300" />
+          <url>file://$PROJECT_DIR$/spiders/jieshu.py</url>
+          <line>35</line>
+          <option name="timeStamp" value="331" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_zuqiu.py</url>
-          <line>48</line>
-          <option name="timeStamp" value="301" />
+          <line>93</line>
+          <option name="timeStamp" value="332" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/pipeline/roll_zuqiu.py</url>
-          <line>49</line>
-          <option name="timeStamp" value="302" />
+          <line>535</line>
+          <option name="timeStamp" value="333" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_zuqiu.py</url>
+          <line>566</line>
+          <option name="timeStamp" value="334" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/pipeline/roll_lanqiu.py</url>
+          <line>54</line>
+          <option name="timeStamp" value="335" />
         </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>88</line>
+          <option name="timeStamp" value="336" />
         </line-breakpoint>
       </breakpoints>
       <default-breakpoints>
@@ -1338,55 +1384,29 @@
     </expressions>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/log/guanjun_2019_9_4.log" />
-    <entry file="file://$PROJECT_DIR$/log/zuqiu_2019_9_6.log" />
-    <entry file="file://C:/venv/Lib/site-packages/bson/son.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="139">
-          <caret line="78" selection-start-line="78" selection-end-line="78" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/../../zq_match_status.log" />
-    <entry file="file://C:/venv/Lib/site-packages/pymongo/common.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1510">
-          <caret line="925" column="8" selection-start-line="925" selection-start-column="8" selection-end-line="925" selection-end-column="8" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$USER_HOME$/.PyCharm2018.3/system/python_stubs/454006823/_blake2.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-189">
-          <caret line="42" column="8" selection-start-line="42" selection-start-column="8" selection-end-line="42" selection-end-column="8" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://C:/venv/Lib/site-packages/pymongo/bulk.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="287">
-          <caret line="541" column="53" selection-start-line="541" selection-start-column="51" selection-end-line="541" selection-end-column="57" />
-        </state>
-      </provider>
+    <entry file="file://$PROJECT_DIR$/log/FTzhibo_2019_10_16.log" />
+    <entry file="file://$PROJECT_DIR$/jianting.py">
+      <provider selected="true" editor-type-id="text-editor" />
     </entry>
-    <entry file="file://C:/venv/Lib/site-packages/scrapy/http/response/text.py">
+    <entry file="file://$PROJECT_DIR$/ball_func.py" />
+    <entry file="file://$PROJECT_DIR$/main_time.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="145">
-          <caret line="118" selection-start-line="118" selection-end-line="118" />
+        <state>
+          <folding>
+            <element signature="e#0#11#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/other_saiguo.py" />
-    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
+    <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="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 relative-caret-position="120">
+          <caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/requirements.txt" />
     <entry file="file://$PROJECT_DIR$/middlewares.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="127">
@@ -1397,343 +1417,326 @@
         </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">
+    <entry file="file://$PROJECT_DIR$/utils/__init__.py">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/not_roll.py">
+    <entry file="file://$PROJECT_DIR$/utils/langconv.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state>
-          <caret selection-end-line="1" />
-          <folding>
-            <element signature="e#0#11#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="3620">
+          <caret line="182" selection-start-line="182" selection-end-line="182" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/ball_func.py" />
-    <entry file="file://$PROJECT_DIR$/change.py">
+    <entry file="file://C:/venv/Lib/site-packages/redis/client.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 relative-caret-position="201">
+          <caret line="2704" column="48" selection-start-line="2704" selection-start-column="44" selection-end-line="2704" selection-end-column="48" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main_time.py">
+    <entry file="file://$PROJECT_DIR$/roll.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state>
+        <state relative-caret-position="180">
+          <caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
           <folding>
             <element signature="e#0#11#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/proj/__init__.py" />
+    <entry file="file://$PROJECT_DIR$/proj/tasks.py" />
+    <entry file="file://$PROJECT_DIR$/proj/celeryconfig.py" />
+    <entry file="file://$PROJECT_DIR$/proj/celery.py" />
+    <entry file="file://$PROJECT_DIR$/utils/LocalToken.py">
       <provider selected="true" editor-type-id="text-editor">
         <state>
-          <caret column="9" selection-end-line="1" selection-end-column="23" />
-          <folding>
-            <element signature="e#48#59#0" expanded="true" />
-          </folding>
+          <caret column="93" selection-start-column="93" selection-end-column="93" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/guanjun.sh">
+    <entry file="file://$PROJECT_DIR$/hgg070" />
+    <entry file="file://$PROJECT_DIR$/main.py">
       <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 relative-caret-position="280">
+          <caret line="14" column="42" selection-start-line="14" selection-start-column="42" selection-end-line="14" selection-end-column="42" />
+          <folding>
+            <element signature="e#0#10#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/utils/helper.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="62">
-          <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="-216">
+          <caret line="12" selection-start-line="12" selection-end-line="12" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#0#14#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipelines.py">
+    <entry file="file://$PROJECT_DIR$/settings.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="120">
-          <caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
+        <state relative-caret-position="2564">
+          <caret line="137" column="48" selection-start-line="137" selection-start-column="48" selection-end-line="137" selection-end-column="48" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/requirements.txt">
+    <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py" />
+    <entry file="file://$PROJECT_DIR$/spiders/liansai.py" />
+    <entry file="file://$PROJECT_DIR$/items.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-660">
-          <caret selection-end-line="61" selection-end-column="21" />
+        <state relative-caret-position="635">
+          <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$/pipeline/guanjun.py">
+    <entry file="file://$PROJECT_DIR$/change.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2151">
-          <caret line="110" column="20" lean-forward="true" selection-start-line="110" selection-start-column="20" selection-end-line="110" selection-end-column="20" />
+        <state relative-caret-position="240">
+          <caret line="12" selection-start-line="12" selection-end-line="12" />
           <folding>
-            <element signature="e#18#32#0" expanded="true" />
+            <element signature="e#0#11#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/wqbodan.py">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/ball_func.py">
+    <entry file="file://$PROJECT_DIR$/not_roll.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" />
+        <state>
+          <caret selection-end-line="3" selection-end-column="65" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#0#11#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-1506">
-          <caret line="54" column="65" selection-start-line="54" selection-start-column="65" selection-end-line="54" selection-end-column="65" />
+        <state>
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
           <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$/spiders/guanjun.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/zhibo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="480">
-          <caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
+        <state relative-caret-position="40">
+          <caret line="2" selection-start-line="2" selection-end-line="2" />
           <folding>
-            <element signature="e#38#53#0" expanded="true" />
+            <element signature="e#0#14#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/liansai.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="460">
-          <caret line="31" selection-start-line="31" selection-end-line="31" />
+        <state relative-caret-position="20">
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
+          <folding>
+            <element signature="e#0#15#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/jieshu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="480">
-          <caret line="24" column="23" selection-start-line="24" selection-start-column="23" selection-end-line="24" selection-end-column="99" />
+        <state relative-caret-position="-924">
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/langconv.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-360" />
+        <state>
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
+          <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$/pipeline/roll_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="222">
-          <caret line="53" column="23" lean-forward="true" selection-start-line="53" selection-start-column="23" selection-end-line="53" selection-end-column="23" />
+        <state relative-caret-position="120">
+          <caret line="6" column="14" selection-start-line="6" selection-start-column="14" selection-end-line="6" selection-end-column="14" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/zhibo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="462">
-          <caret line="38" column="152" selection-start-line="38" selection-start-column="152" selection-end-line="38" selection-end-column="152" />
+        <state>
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
           <folding>
             <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zhibo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_wangqiu.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" />
+        <state>
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
           <folding>
-            <element signature="e#38#53#0" expanded="true" />
+            <element signature="e#0#15#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/jieshu.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.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="40">
+          <caret line="2" selection-start-line="2" selection-end-line="2" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#18#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/settings.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/saiguo.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" selection-end-column="68" />
+        <state>
+          <caret column="17" selection-start-column="17" selection-end-column="17" />
+          <folding>
+            <element signature="e#0#14#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/items.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/ball_func.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="60">
+          <caret line="3" selection-start-line="3" selection-end-line="3" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/helper.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="80">
-          <caret line="4" column="23" selection-start-line="4" selection-start-column="23" selection-end-line="4" selection-end-column="23" />
+        <state relative-caret-position="20">
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
           <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/saiguo.py">
+    <entry file="file://$PROJECT_DIR$/pipeline/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="20">
-          <caret line="20" selection-start-line="20" selection-end-line="21" />
+        <state relative-caret-position="40">
+          <caret line="2" selection-start-line="2" selection-end-line="2" />
+          <folding>
+            <element signature="e#18#32#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/bangqiu.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" />
-          <folding>
-            <element signature="e#38#53#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="-480">
+          <caret line="3" column="11" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/guanjun.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-77">
-          <caret line="31" column="6" selection-start-line="31" selection-start-column="6" selection-end-line="31" selection-end-column="6" />
+        <state>
+          <caret column="23" selection-start-column="23" selection-end-column="23" />
           <folding>
-            <element signature="e#24#35#0" expanded="true" />
+            <element signature="e#38#53#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/jieshu.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" />
-          <folding>
-            <element signature="e#24#39#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="60">
+          <caret line="3" column="11" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/main.py">
+    <entry file="file://$PROJECT_DIR$/spiders/lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="280">
-          <caret line="14" column="44" lean-forward="true" selection-start-line="14" selection-start-column="44" selection-end-line="14" selection-end-column="44" />
-          <folding>
-            <element signature="e#0#10#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="80">
+          <caret line="4" column="11" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="11" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_bangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="282">
-          <caret line="57" column="43" selection-start-line="57" selection-start-column="43" selection-end-line="57" selection-end-column="43" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-            <element signature="e#9361#9373#0" />
-          </folding>
+        <state relative-caret-position="80">
+          <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_lanqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-660">
-          <caret lean-forward="true" />
-          <folding>
-            <element signature="e#0#15#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="40">
+          <caret line="2" column="11" selection-start-line="2" selection-start-column="11" selection-end-line="2" selection-end-column="11" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/lanqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="125">
-          <caret line="44" column="43" selection-start-line="44" selection-start-column="43" selection-end-line="44" selection-end-column="43" />
+        <state relative-caret-position="20">
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
           <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$/pipeline/roll_bangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/saiguo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1660">
-          <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="40">
+          <caret line="2" selection-start-line="2" selection-end-line="2" />
           <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$/spiders/wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1680">
-          <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="20">
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#48#59#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/roll_zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zhibo.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="11369">
-          <caret line="591" selection-start-line="591" selection-end-line="710" selection-end-column="72" />
+        <state relative-caret-position="40">
+          <caret line="2" selection-start-line="2" selection-end-line="2" />
           <folding>
-            <element signature="e#18#33#0" expanded="true" />
-            <element signature="e#34479#34589#0" />
+            <element signature="e#38#53#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/wangqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/zuqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="740">
-          <caret line="73" column="13" lean-forward="true" selection-start-line="73" selection-start-column="13" selection-end-line="73" selection-end-column="13" />
+        <state>
+          <caret line="12" selection-start-line="12" selection-end-line="12" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
+            <element signature="e#24#35#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pipeline/zuqiu.py">
+    <entry file="file://$PROJECT_DIR$/spiders/roll_wangqiu.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1566">
-          <caret line="103" column="8" selection-start-line="103" selection-start-column="8" selection-end-line="103" selection-end-column="83" />
+        <state relative-caret-position="5680">
+          <caret line="323" column="31" selection-start-line="323" selection-start-column="26" selection-end-line="323" selection-end-column="31" />
           <folding>
-            <element signature="e#0#15#0" expanded="true" />
-            <element signature="e#33612#33722#0" />
+            <element signature="e#24#39#0" expanded="true" />
           </folding>
         </state>
       </provider>

+ 2 - 6
hg3535/main.py

@@ -4,20 +4,16 @@ from scrapy.cmdline import execute
 
 # print(os.path.dirname(os.path.abspath(__file__)))
 sys.path.append(os.path.dirname(os.path.abspath(__file__)))
-# execute(["scrapy", "crawl", "liansai"])
 # execute(["scrapy", "crawl", "zuqiu"])
 # execute(["scrapy", "crawl", "lanqiu"])
 # execute(["scrapy", "crawl", "guanjun"])
 # execute(["scrapy", "crawl", "wangqiu"])
 # execute(["scrapy", "crawl", "wqbodan"])
 # execute(["scrapy", "crawl", "bangqiu"])
-execute(["scrapy", "crawl", "roll_zuqiu"]) # 滚球足球 回来要解开这个注释 其他全部解封
-# execute(["scrapy", "crawl", "roll_lanqiu"]) #滚球篮球
+# execute(["scrapy", "crawl", "roll_zuqiu"]) # 滚球足球 回来要解开这个注释 其他全部解封
+execute(["scrapy", "crawl", "roll_lanqiu"]) #滚球篮球
 # execute(["scrapy", "crawl", "roll_wangqiu"]) #滚球网球
 # execute(["scrapy", "crawl", "roll_bangqiu"])  # 滚球棒球
-# execute(["scrapy", "crawl", "ball_status"]) #滚球id本地存
-# execute(["scrapy", "crawl", "ball_status_update"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "saiguo"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "jieshu"]) #滚球id结束时间更新状态
 # execute(["scrapy", "crawl", "zhibo"]) #滚球id结束时间更新状态
-# execute(["scrapy", "crawl", "bq_jieshu"]) #滚球id结束时间更新状态

+ 2 - 1
hg3535/pipeline/ball_func.py

@@ -1,5 +1,6 @@
+# encoding: utf-8
+
 import datetime
-# import hashlib
 import time
 
 

+ 21 - 20
hg3535/pipeline/bangqiu.py

@@ -1,3 +1,6 @@
+# encoding: utf-8
+
+
 import datetime
 import pymongo
 import time
@@ -14,7 +17,7 @@ class Bangqiupipeline(object):
     def open_spider(self, spider):
 
         self.mongo = pymongo.MongoClient(host=M_HOST, username=M_USER, password=M_PASSWORD, port=M_POST,
-                                         authSource='kaiyou')
+                                         authSource=M_DB)
         self.db = self.mongo[M_DB]
 
     @defer.inlineCallbacks
@@ -22,7 +25,7 @@ class Bangqiupipeline(object):
         out = defer.Deferred()
         reactor.callInThread(self._do_calculation, item, out)
         yield out
-        defer.returnValue(item)
+        # defer.returnValue(item)
 
     def _do_calculation(self, item, out):
     # def process_item(self, item, spider):
@@ -60,18 +63,18 @@ 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))
-        # 队1分数
-        score_home = item['score_home']
-        # 队2分数
-        score_guest = item['score_guest']
-        # 第几节
-        jijie = item['jijie']
-        # 球队得分
-        qiudui = item['qiudui']
+        # expire_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() + 60))
+        # # 队1分数
+        # score_home = item['score_home']
+        # # 队2分数
+        # score_guest = item['score_guest']
+        # # 第几节
+        # jijie = item['jijie']
+        # # 球队得分
+        # qiudui = item['qiudui']
         pt = str(item['pt'])
         # 让球
         concedes_dict = item['concedes_dict']
@@ -98,14 +101,14 @@ class Bangqiupipeline(object):
         # except:
         #     team_score_guest_dict = ""
         #     team_score_guest_rule_dict = ""
-        bangqiu = item['bangqiu']
+        # bangqiu = item['bangqiu']
         match_date, match_time, time3 = new_time(ctime)
         us_time = ctime
         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"]
@@ -117,15 +120,13 @@ class Bangqiupipeline(object):
             if res:
                 if res.get('status') == 1:
                     self.db.bq_league35.insert(league_data)
-                    # self.db.bq_league35.update({'lg_id': league_id}, {'$set': league_data},
-                    #                                 upsert=True)
                     logger.info('棒球联赛提交成功, {}'.format(res))
                 else:
                     logger.warning('棒球联赛提交失败, {}'.format(res))
-                    logger.warning(league_dict)
+                    # logger.warning(league_dict)
             else:
                 logger.warning('棒球滚球联赛,接口异常,提交失败, {}'.format(res))
-                logger.warning(league_dict)
+                # logger.warning(league_dict)
         else:
             logger.info('棒球滚球联赛, 已存在不提交')
 
@@ -147,8 +148,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"}

+ 14 - 12
hg3535/pipeline/guanjun.py

@@ -1,4 +1,6 @@
-# import datetime
+# encoding: utf-8
+
+
 import pymongo
 import time
 import logging
@@ -19,7 +21,7 @@ class Guanjunpipeline(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):
@@ -61,7 +63,7 @@ class Guanjunpipeline(object):
         else:
             print(ball, "冠军数据球类错误")
             return
-        uuid = Helper.genearte_uuid(league_name + 'hg3535')
+        uuid = Helper.genearte_uuid(league_name)
         if self.db[league_table].find({'lg_id': league_id}).count() < 1:
             league_list = []
             payload_key = ['game_code', 'title', 'lg_id', 'source']
@@ -79,19 +81,19 @@ class Guanjunpipeline(object):
                 if res:
                     if res.get('status') == 1:
                         logger.info('{}, {}冠军联赛, 提交成功, {}'.format(game_code, league_name, res))
-                        logger.info(league_list)
+                        # logger.info(league_list)
                         self.db[league_table].insert(league_dict)
                         # self.db[league_table].update({'lg_id': league_id}, {'$set': league_dict},
                         #                                 upsert=True)
                     else:
                         logger.warning('{}, {}, 冠军联赛, 提交失败, {}'.format(game_code, league_name, res))
-                        logger.warning(l_payload)
+                        # logger.warning(l_payload)
                 else:
                     logger.warning('{}, {}, 冠军联赛, 接口异常, 提交失败, {}'.format(game_code, league_name, res))
-                    logger.warning(l_payload)
+                    # logger.warning(l_payload)
             except Exception as e:
                 logger.warning('冠军联赛接口异常, 提交失败, {}'.format(e))
-                logger.warning(e)
+                # logger.warning(e)
         else:
             logging.info('{},冠军联赛数据已存在'.format(league_name))
         payload_key1 = ['game_code', 'title', 'source', 'lg_id', 'uuid']
@@ -124,17 +126,17 @@ class Guanjunpipeline(object):
                 if res:
                     if res.get('status') == 1:
                         logger.info('{}冠军赔率,提交成功, {}'.format(game_code, res))
-                        logger.info(chain_dict)
+                        # logger.info(chain_dict)
                         self.db[odds_table].insert(chain_data)
                     else:
                         logger.warning('{}, 冠军赔率接口, 提交失败, {}'.format(game_code, res))
-                        logger.warning(chain_dict)
+                        # logger.warning(chain_dict)
                 else:
                     logger.warning('{}, 冠军赔率接口, 接口异常, 提交失败, {}'.format(game_code, res))
-                    logger.warning(chain_dict)
+                    # logger.warning(chain_dict)
             except Exception as e:
-                logger.warning('冠军赔率接口异常,提交失败')
-                logger.warning(e)
+                logger.warning('冠军赔率接口异常,提交失败,{}'.format(e))
+                # logger.warning(e)
 
         else:
             logger.info('足球冠军赔率, 列表为空, 不提交过')

+ 13 - 17
hg3535/pipeline/jieshu.py

@@ -1,3 +1,6 @@
+# encoding: utf-8
+
+
 import datetime
 import pymongo
 import logging
@@ -22,7 +25,7 @@ class Jieshuqiupipeline(object):
         out = defer.Deferred()
         reactor.callInThread(self._do_calculation, item, out)
         yield out
-        defer.returnValue(item)
+        # defer.returnValue(item)
 
     def _do_calculation(self, item, out):
         # def process_item(self, item, spider):
@@ -41,21 +44,15 @@ class Jieshuqiupipeline(object):
             game_code = "wq"
         else:
             game_code = "bq"
-
-        dates = str(date.strip(" "))
-        status_dict = {"game_code": game_code, "title": "match_status", "source": "hg3535"}
-        update = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
-        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[dates[1]]
-        day = str(dates[0])
-        data_list = []
         if status:
             ostatus = 1
         else:
             ostatus = 2
-        us_time = '{}-{}-{}'.format(datetime.datetime.now().year, month, day)
-        match_identity = Helper.genearte_uuid(home + away + us_time)
+        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 + 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}
@@ -65,16 +62,15 @@ class Jieshuqiupipeline(object):
         if res:
             if res.get('status') == 1:
                 self.db.match_status35.insert(data)
-                # self.db.match_status35.update({'match_id': match_id}, {'$set': data}, upsert=True)
                 if ostatus == 2:
-                    self.rls.srem('hg3535.gunqiu.ids', match_id)
+                    self.rls.hdel('hg3535.GunQiu.ids', match_id)
                 logger.info('{},赛事结果状态交成功, {}'.format(game_code, res))
-                logger.info(status_dict)
+                # logger.info(status_dict)
                 print(status_dict)
             else:
                 logger.warning('{},赛事结果状态交失败, {}'.format(game_code, res))
-                logger.warning(status_dict)
+                # logger.warning(status_dict)
         else:
             logger.warning('{},赛事结果状态接口异常提交失败, {}'.format(game_code, res))
-            logger.warning(status_dict)
+            # logger.warning(status_dict)
         reactor.callFromThread(out.callback, item)

+ 9 - 8
hg3535/pipeline/lanqiu.py

@@ -1,10 +1,11 @@
+# encoding: utf-8
+
+
 import datetime
 import pymongo
 import time
 import logging
 from twisted.internet import defer, reactor
-# from .ball_func import fuhao
-
 from ..utils.helper import Helper
 from .ball_func import new_time
 from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL
@@ -42,7 +43,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 +51,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 +81,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 +122,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",

+ 9 - 23
hg3535/pipeline/roll_bangqiu.py

@@ -1,8 +1,10 @@
+# encoding: utf-8
+
+
 import datetime
 import pymongo
 import time
 import logging
-# import json
 from twisted.internet import defer, reactor
 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
@@ -36,26 +38,10 @@ class Roll_Banqiupipeline(object):
         team_guest = item['team_guest']
         # 数量(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)
         # 比赛时间
         time_game = str(item['time_game'])
-        # 比赛时间,时间戳
-        ctime = "2019" + "-" + month + "-" + day + "" + time_game + ":00".strip()
         # 现在时间,时间戳
-        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
+        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() - 43200))
         cdate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
         match_date = cdate.split(' ')[0]
         match_time = cdate.split(' ')[1]
@@ -84,7 +70,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 +94,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",
@@ -201,7 +187,7 @@ class Roll_Banqiupipeline(object):
         odds_key = ["game_code", "title", "match_id", "lg_id", "data", "source", "odds_only", "tag", "uuid",
                     "is_stringscene", "utime", "pt", 'match_identity']
         odds_value = ["bq", "odds", match_id, league_id, data_list, "hg3535", odds_onlys, tag_number, uuid,
-                      0, utime, pt, match_identity]
+                      0, cdate, pt, match_identity]
         odds_dict = dict(zip(odds_key, odds_value))
         if data_list:
             res = Helper.async_post(ODDS_URL, odds_dict)
@@ -226,7 +212,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 = {

+ 8 - 20
hg3535/pipeline/roll_lanqiu.py

@@ -1,3 +1,5 @@
+# encoding: utf-8
+
 import datetime
 
 import pymongo
@@ -39,23 +41,9 @@ 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)
         time_game = str(item['time_game'])
         # 现在时间,时间戳
-        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
+        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() - 43200))
         cdate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
         match_date = cdate.split(' ')[0]
         match_time = cdate.split(' ')[1]
@@ -80,7 +68,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 +91,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",
@@ -251,7 +239,7 @@ class Roll_Lanqiupipeline(object):
         odds_key = ["game_code", "title", "match_id", "lg_id", "data", "source", "odds_only", "tag", "uuid",
                     "is_stringscene", "utime", "pt", 'match_identity']
         odds_value = ["lq", "odds", match_id, league_id, data_list, "hg3535", odds_onlys, number, uuid,
-                      0, utime, pt, match_identity]
+                      0, cdate, pt, match_identity]
         odds_dict = dict(zip(odds_key, odds_value))
         if data_list:
             res = Helper.async_post(ODDS_URL, odds_dict)
@@ -265,7 +253,7 @@ class Roll_Lanqiupipeline(object):
                 logger.warning('篮球滚球详细赔率接口异常, 提交失败, {}'.format(res))
                 # logger.warning(odds_dict)
         else:
-            logger.info('篮球滚球详细赔率列表, 不提交')
+            logger.info('篮球滚球详细赔率列表为空, 不提交')
         data_list = []
         lq_rball = {"home_team": team_home, "guest_team": team_guest,
                     "lg_id": league_id, "home_rate": 0, 'match_identity': match_identity,

+ 8 - 21
hg3535/pipeline/roll_wangqiu.py

@@ -1,8 +1,10 @@
+# encoding: utf-8
+
+
 import datetime
 import pymongo
 import time
 import logging
-import json
 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 twisted.internet import defer, reactor
@@ -42,25 +44,10 @@ 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()
         # 比赛时间
         time_game = str(item['time_game'])
-        # 比赛时间,时间戳
-        # ctime = "2019" + "-" + month + "-" + day + "" + time_game + ":00"
-        us_date = "{}-{}-{}".format(datetime.datetime.now().year, month, day)
         # 现在时间,时间戳
-        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
+        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() - 43200))
         cdate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
         match_date = cdate.split(' ')[0]
         match_time = cdate.split(' ')[1]
@@ -95,7 +82,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 +108,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",
@@ -235,7 +222,7 @@ class Roll_Wangqiupipeline(object):
         odds_key = ["game_code", "title", "match_id", "lg_id", "data", "source", "odds_only", "tag", "uuid",
                     "is_stringscene", "utime", "pt", 'match_identity']
         odds_value = ["wq", "odds", match_id, league_id, data_list, "hg3535", odds_onlys, tag_number, uuid,
-                      0, utime, pt, match_identity]
+                      0, cdate, pt, match_identity]
         odds_dict = dict(zip(odds_key, odds_value))
         if data_list:
             res = Helper.async_post(ODDS_URL, odds_dict)

+ 18 - 149
hg3535/pipeline/roll_zuqiu.py

@@ -1,4 +1,6 @@
-# import datetime
+# encoding: utf-8
+
+
 import datetime
 
 import pymongo
@@ -31,21 +33,8 @@ class Roll_Zuqiupipeline(object):
         # 比赛时间
         time_game = str(item['time_game'])
         # 现在时间,时间戳
-        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
+        utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time() - 43200))
         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)
         match_date = cdate.split(' ')[0]
         match_time = cdate.split(' ')[1]
         # 比赛id
@@ -68,8 +57,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 +79,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",
@@ -107,13 +96,13 @@ class Roll_Zuqiupipeline(object):
                 if res.get('status') == 1:
                     self.db.zq_competition35.insert(match_data)
                     logger.info('足球滚球赛事提交成功, {}'.format(res))
-                    logger.info(match_data)
+                    # logger.info(match_data)
                 else:
                     logger.warning('足球滚球赛事,提交失败, {}'.format(res))
-                    logger.warning(match_data)
+                    # logger.warning(match_data)
             else:
                 logger.warning('足球滚球赛事接口异常提交失败, {}'.format(res))
-                logger.warning(match_data)
+                # logger.warning(match_data)
         else:
             logger.info('足球滚球赛事已存在, 不提交')
         p_code = "GS"
@@ -541,20 +530,20 @@ class Roll_Zuqiupipeline(object):
         odds_key = ["game_code", "title", "match_id", "lg_id", "data", "source", "odds_only", "tag", "uuid",
                     "is_stringscene", "utime", "pt", 'match_identity']
         odds_value = ["zq", "odds", match_id, league_id, data_list, "hg3535", odds_onlys, number, uuid,
-                      0, utime, pt, match_identity]
+                      0, cdate, pt, match_identity]
         odds_dict = dict(zip(odds_key, odds_value))
         if data_list:
             res = Helper.async_post(ODDS_URL, odds_dict)
             if res:
                 if res.get('status') == 1:
                     logger.info('足球滚球详细赔率提交成功, {}'.format(res))
-                    logger.info(odds_dict)
+                    # logger.info(odds_dict)
                 else:
                     logger.warning('足球滚球详细赔率提交失败, {}'.format(res))
-                    logger.warning(odds_dict)
+                    # logger.warning(odds_dict)
             else:
                 logger.warning('足球滚球详细赔率接口异常,提交失败, {}'.format(res))
-                logger.warning(odds_dict)
+                # logger.warning(odds_dict)
         else:
             logger.info('足球滚球详细赔率列表为空')
         data_list = []
@@ -580,135 +569,15 @@ class Roll_Zuqiupipeline(object):
                     if res.get('status') == 1:
                         logger.info('足球滚球结果记录提交成功, {}'.format(res))
                         self.db.zq_match_result35.insert(zq_rball)
-                        logger.info(r_data_dict)
+                        # logger.info(r_data_dict)
                     else:
                         logger.warning('足球滚球结果记录提交失败, {}'.format(res))
-                        logger.warning(r_data_dict)
+                        # logger.warning(r_data_dict)
                 else:
                     logger.warning('足球滚球结果记录接口异常,提交失败, {}'.format(res))
-                    logger.warning(r_data_dict)
+                    # logger.warning(r_data_dict)
             except Exception as e:
                 logger.warning('滚球数据接口异常,提交失败, {}'.format(e))
-        # #   角球分割处理--------------------------------------------------------------------------------------------------
-        # if horn_team:
-        #     team_home = horn_team['horn_home']
-        #     team_guest = horn_team['horn_guest']
-        #     horn_scoreh = horn_team['horn_scoreh']
-        #     horn_scoreg = horn_team['horn_scoreg']
-        #     all_goal = int(horn_scoreh) + int(horn_scoreg)
-        #     match_id = horn_team['horn_id']
-        #     # half_way = item['half_way']
-        #     match_score = "{}:{}".format(horn_scoreh, horn_scoreg)
-        #     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_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",
-        #                      "tag", "source", "is_rollball", "is_morningplate", "is_stringscene", "us_time", "uuid",
-        #                      "half_match_id", "is_today", "is_horn", 'match_identity']
-        #         match_value = [team_home, team_guest, league_id, 1, match_id, match_date, match_time, number,
-        #                        "hg3535", 1, 0, 0, utime, uuid, 0, 0, 1, match_identity]
-        #         match_data = dict(zip(match_kay, match_value))
-        #         match_list.append(match_data)
-        #         match_dict['data'] = match_list
-        #         res = Helper.async_post(MATCH_URL, match_dict)
-        #         if res:
-        #             if res.get('status') == 1:
-        #                 self.db.zq_competition35.insert(match_data)
-        #                 logger.info('足球滚球角球, 赛事提交成功, {}'.format(res))
-        #                 # logger.info(match_data)
-        #             else:
-        #                 logger.warning('足球滚球赛事, 角球提交失败, {}'.format(res))
-        #                 # logger.warning(match_data)
-        #         else:
-        #             logger.warning('足球滚球赛事接口异常, 角球赛事提交失败, {}'.format(res))
-        #             # logger.warning(match_data)
-        #     else:
-        #         logger.info('足球滚球赛事已存在, 不提交')
-        #     data_list = []
-        #     odds_onlys = []
-        #     p_code = 'CB'
-        #     horn_ou_dict = item['horn_ou_dict']
-        #     horn_ou_dict_rule = item['horn_ou_dict_rule']
-        #     horn_oe_dict = item['horn_oe_dict']
-        #     horn_oe_dict_rule = item['horn_oe_dict_rule']
-        #     if horn_ou_dict:
-        #         for key, value in horn_ou_dict.items():
-        #             hash_str = p_code + key + '0' + horn_ou_dict_rule[key] + str(value) + "hg3535" + str(match_id)
-        #             sole_str = p_code + key + '0' + str(match_id) + "hg3535"
-        #             odds_only = Helper.genearte_MD5(hash_str, pt)
-        #             sole = Helper.genearte_MD5(sole_str, pt)
-        #             horn_ou_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
-        #                            "condition", "odds_only", "sole", "source", "type", "team"]
-        #             horn_ou_value = [match_id, league_id, key, "0", 0, p_code, value, horn_ou_dict_rule[key],
-        #                              odds_only, sole, "hg3535", "0", ""]
-        #             horn_ou_data = dict(zip(horn_ou_key, horn_ou_value))
-        #             data_list.append(horn_ou_data)
-        #
-        #     if horn_oe_dict:
-        #         for key, value in horn_oe_dict.items():
-        #             hash_str = p_code + key + '0' + horn_oe_dict_rule[key] + str(value) + "hg3535" + str(match_id)
-        #             sole_str = p_code + key + '0' + str(match_id) + "hg3535"
-        #             odds_only = Helper.genearte_MD5(hash_str, pt)
-        #             sole = Helper.genearte_MD5(sole_str, pt)
-        #             horn_oe_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
-        #                            "condition", "odds_only", "sole", "source", "type", "team"]
-        #             horn_oe_value = [match_id, league_id, key, "0", 0, p_code, value, horn_oe_dict_rule[key],
-        #                              odds_only, sole, "hg3535", "0", ""]
-        #             horn_oe_data = dict(zip(horn_oe_key, horn_oe_value))
-        #             data_list.append(horn_oe_data)
-        #
-        #     odds_key = ["game_code", "title", "match_id", "lg_id", "data", "source", "odds_only", "tag", "uuid",
-        #                 "is_stringscene", "utime", "pt", 'match_identity']
-        #     odds_value = ["zq", "odds", match_id, league_id, data_list, "hg3535", odds_onlys, number, uuid,
-        #                   0, utime, pt, match_identity]
-        #     odds_dict = dict(zip(odds_key, odds_value))
-        #     if data_list:
-        #         res = Helper.async_post(ODDS_URL, odds_dict)
-        #         if res:
-        #             if res.get('status') == 1:
-        #                 logger.info('足球滚球, 角球详细赔率提交成功, {}'.format(res))
-        #                 # logger.info(odds_dict)
-        #             else:
-        #                 logger.warning('足球滚球, 角球详细赔率提交失败, {}'.format(res))
-        #                 # logger.warning(odds_dict)
-        #         else:
-        #             logger.warning('足球滚球, 角球详细赔率接口异常,提交失败, {}'.format(res))
-        #             # logger.warning(odds_dict)
-        #     else:
-        #         logger.info('足球滚球, 角球详细赔率列表为空')
-        #     data_list = []
-        #     zq_rball = {"home_team": team_home, "guest_team": team_guest,
-        #                 "lg_id": league_id, "home_rate": 0,
-        #                 "guest_rate": 0, "home_score": horn_scoreh,
-        #                 "guest_score": horn_scoreg, "all_goal": all_goal, "status": 1,
-        #                 "first_score": "", "last_score": "", "match_score": match_score, "uuid": uuid,
-        #                 "match_winer": "", "match_time": time_game,
-        #                 "match_process": half_way, "tag": number,
-        #                 "match_id": match_id, "p_code": "", 'match_identity': match_identity}
-        #     data_list.append(zq_rball)
-        #     r_data_dict = {
-        #         "game_code": "zq",
-        #         "title": "match_result_r",
-        #         "source": "hg3535",
-        #         "data": data_list
-        #     }
-        #     if data_list:
-        #         try:
-        #             res = Helper.async_post(MATCH_RESULT, r_data_dict)
-        #             if res:
-        #                 if res.get('status') == 1:
-        #                     logger.info('足球滚球, 角球结果记录提交成功, {}'.format(res))
-        #                     self.db.zq_match_result35.insert(zq_rball)
-        #                     # logger.info(r_data_dict)
-        #                 else:
-        #                     logger.warning('足球滚球, 角球结果记录提交失败, {}'.format(res))
-        #                     # logger.warning(r_data_dict)
-        #             else:
-        #                 logger.warning('足球滚球, 角球结果记录接口异常,提交失败, {}'.format(res))
-        #                 # logger.warning(r_data_dict)
-        #         except Exception as e:
-        #             logger.warning('滚球数据接口异常, 角球结果提交失败, {}'.format(e))
         reactor.callFromThread(out.callback, item)
 
 

+ 15 - 13
hg3535/pipeline/saiguo.py

@@ -1,3 +1,5 @@
+# encoding: utf-8
+
 import pymongo
 import logging
 
@@ -19,7 +21,7 @@ class Jieshuqiupipeline(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):
@@ -46,13 +48,13 @@ class Jieshuqiupipeline(object):
                 if res.get('status') == 1:
                     self.db.zq_saiguo35.insert(post_data)
                     logger.info('{},赛事结果状态交成功, {}'.format('zq', res))
-                    logger.info(post_data)
+                    # logger.info(post_data)
                 else:
                     logger.warning('{},赛事结果状态交失败, {}'.format('zq', res))
-                    logger.warning(post_data)
+                    # logger.warning(post_data)
             else:
                 logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('zq', res))
-                logger.warning(post_data)
+                # logger.warning(post_data)
         elif pt == 2:
             h_score = item["score_half"]
             f_score = item["score_result"]
@@ -68,13 +70,13 @@ class Jieshuqiupipeline(object):
                 if res.get('status') == 1:
                     self.db.lq_saiguo35.insert(post_data)
                     logger.info('{},赛事结果状态交成功, {}'.format('lq', res))
-                    logger.info(post_data)
+                    # logger.info(post_data)
                 else:
                     logger.warning('{},赛事结果状态交失败, {}'.format('lq', res))
-                    logger.warning(post_data)
+                    # logger.warning(post_data)
             else:
                 logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('lq', res))
-                logger.warning(post_data)
+                # logger.warning(post_data)
         elif pt == 3:
             f_score = item["score_result"]
             post_data = {'game_code': 'wq', "title": "result", "source": "hg3535", "data": []}
@@ -87,13 +89,13 @@ class Jieshuqiupipeline(object):
                 if res.get('status') == 1:
                     self.db.wq_saiguo35.insert(post_data)
                     logger.info('{},赛事结果状态交成功, {}'.format('wq', res))
-                    logger.info(post_data)
+                    # logger.info(post_data)
                 else:
                     logger.warning('{},赛事结果状态交失败, {}'.format('wq', res))
-                    logger.warning(post_data)
+                    # logger.warning(post_data)
             else:
                 logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('wq', res))
-                logger.warning(post_data)
+                # logger.warning(post_data)
         else:
             h_score = item["score_half"]
             f_score = item["score_full"]
@@ -107,11 +109,11 @@ class Jieshuqiupipeline(object):
                 if res.get('status') == 1:
                     self.db.bq_saiguo35.insert(post_data)
                     logger.info('{},赛事结果状态交成功, {}'.format('bq', res))
-                    logger.info(post_data)
+                    # logger.info(post_data)
                 else:
                     logger.warning('{},赛事结果状态交失败, {}'.format('bq', res))
-                    logger.warning(post_data)
+                    # logger.warning(post_data)
             else:
                 logger.warning('{},赛事结果状态接口异常提交失败, {}'.format('bq', res))
-                logger.warning(post_data)
+                # logger.warning(post_data)
         reactor.callFromThread(out.callback, item)

+ 8 - 26
hg3535/pipeline/wangqiu.py

@@ -1,20 +1,19 @@
+# encoding: utf-8
+
+
 import datetime
 import pymongo
 import time
 import logging
 
 from twisted.internet import defer, reactor
-
-# from .ball_func import fuhao
 from ..utils.helper import Helper
-from .ball_func import new_time, out_time
+from .ball_func import new_time
 from ..settings import M_HOST, M_USER, M_PASSWORD, M_POST, M_DB, LEAGUE_URL, ODDS_URL, MATCH_URL
 
 
 class Wangqiupipeline(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='kaiyou')
         self.db = self.mongo[M_DB]
 
@@ -42,10 +41,6 @@ class Wangqiupipeline(object):
         team_guest = item['team_guest']
         # 数量(97>)
         tag_number = item['number']
-        # 比赛状态
-        # zhuangtai = item['zhuangtai']
-        # 日期
-        # data_game = item['data_game']
         try:
             data_game = item['data_game'].split("/")
             month = str(data_game[1].strip())
@@ -63,18 +58,8 @@ class Wangqiupipeline(object):
         time_game = str(item['time_game'])
         # 比赛时间,时间戳
         ctime = str(year) + "-" + month + "-" + day + " " + time_game + ":00"
-        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))
-        # 队1分数
-        # score_home = item['score_home']
-        # 队2分数
-        # score_guest = item['score_guest']
-        # 第几节
-        # jijie = item['jijie']
-        # 球队得分
-        # qiudui = item['qiudui']
         pt = str(item['pt'])
         # 让盘
         concedes_dict = item['concedes_dict']
@@ -94,11 +79,10 @@ class Wangqiupipeline(object):
         us_time = ctime
         match_date, match_time, time3 = new_time(ctime)
         # n_time = out_time(time3, 3)
-        uuid = Helper.genearte_uuid(league_name + 'hg3535')
+        uuid = Helper.genearte_uuid(league_name)
         """联赛"""
         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:
             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 +124,8 @@ 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:
             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",
@@ -156,8 +140,6 @@ class Wangqiupipeline(object):
             if res:
                 if res.get('status') == 1:
                     self.db.wq_competition35.insert(match_data)
-                    # self.db.wq_competition35.update({'match_id': match_id, pt_status: 1}, {'$set': match_data},
-                    #                                 upsert=True)
                     logger.info('网球赛事提交成功, {}'.format(res))
                 else:
                     logger.warning('网球赛事提交失败, {}'.format(res))

+ 8 - 8
hg3535/pipeline/zhibo.py

@@ -1,4 +1,5 @@
-import datetime
+# encoding: utf-8
+
 
 import pymongo
 import time
@@ -21,32 +22,31 @@ 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())
         warn_dict = {"game_code": "zq", "title": "match_warn", "source": "hg3535", "match_id": mid, 'up_time': up_time, 'match_identity': match_identity}
         for detail_data in detail_datas:
-            team_name, event_name, event_uts = detail_data
+            team_name, event_name, event_uts, warn_type = detail_data
             find_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(event_uts))
-            detail_dict = {"find_time": find_time, "warn_name": event_name}
+            detail_dict = {"find_time": find_time, "warn_name": event_name, 'warn_type': warn_type}
             warns.append(detail_dict)
         if warns:
             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:

+ 7 - 97
hg3535/pipeline/zuqiu.py

@@ -1,3 +1,4 @@
+# encoding: utf-8
 import datetime
 import time
 import logging
@@ -10,8 +11,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 +28,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 +42,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 +65,7 @@ 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:
             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,8 @@ 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:
+        match_identity = Helper.genearte_uuid(team_home + team_guest + match_date)
+        if self.db.zq_competition35.find({'match_id': match_id, 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",
@@ -568,92 +566,4 @@ class Zuqiupipeline(object):
                 logging.warning('足球详细赔率接口异常, {}'.format(res))
         else:
             logger.info('足球详细赔率列表为空')
-        # # 角球处理分割线---------------------------------------------------------------------------------------------------
-        # horn_team = item['horn_team']
-        # if horn_team:
-        #     team_home = horn_team['horn_home']
-        #     team_guest = horn_team['horn_guest']
-        #     match_id = horn_team['horn_id']
-        #     match_list = []
-        #     match_identity = Helper.genearte_uuid(team_home + team_guest + new_us_time)
-        #     # if self.db.zq_competition35.find({'match_id': match_id, pt_status: 1}).count() < 1:
-        #     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",
-        #                      "half_match_id", "is_today", 'is_horn', 'match_identity']
-        #         match_value = [team_home, team_guest, league_id, 0, match_id, match_date, match_time, tag_number,
-        #                        "hg3535", is_rollball, is_morningplate, is_stringscene, us_time, uuid, 0, is_today, 1, match_identity]
-        #         match_data = dict(zip(match_kay, match_value))
-        #         match_list.append(match_data)
-        #         match_dict['data'] = match_list
-        #         res = Helper.async_post(MATCH_URL, match_dict)
-        #         if res:
-        #             if res.get('status') == 1:
-        #                 self.db.zq_competition35.insert(match_data)
-        #                 logger.info('足球角球, 赛事表提交失败, {}'.format(res))
-        #                 # logger.info(match_dict)
-        #             else:
-        #                 logger.warning('足球角球, 赛事表提交失败, {}'.format(res))
-        #                 # logger.warning(match_dict)
-        #         else:
-        #             logger.warning('足球角球, 赛事接口异常提交失败, {}'.format(res))
-        #             # logger.warning(match_dict)
-        #     else:
-        #         logger.info('足球角球, 赛事已存在,不提交')
-        #     data_list = []
-        #     odds_onlys = []
-        #     p_code = 'CB'
-        #     horn_ou_dict = item['horn_ou_dict']
-        #     horn_ou_dict_rule = item['horn_ou_dict_rule']
-        #     horn_oe_dict = item['horn_oe_dict']
-        #     horn_oe_dict_rule = item['horn_oe_dict_rule']
-        #     if horn_ou_dict:
-        #         for key, value in horn_ou_dict.items():
-        #             hash_str = p_code + key + '0' + horn_ou_dict_rule[key] + str(value) + "hg3535" + str(match_id)
-        #             sole_str = p_code + key + '0' + str(match_id) + "hg3535"
-        #             odds_only = Helper.genearte_MD5(hash_str, pt)
-        #             sole = Helper.genearte_MD5(sole_str, pt)
-        #             horn_ou_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
-        #                            "condition", "odds_only", "sole", "source", "type", "team"]
-        #             horn_ou_value = [match_id, league_id, key, "0", 0, p_code, value, horn_ou_dict_rule[key],
-        #                              odds_only, sole, "hg3535", "0", ""]
-        #             horn_ou_data = dict(zip(horn_ou_key, horn_ou_value))
-        #             data_list.append(horn_ou_data)
-        #
-        #     if horn_oe_dict:
-        #         for key, value in horn_oe_dict.items():
-        #             hash_str = p_code + key + '0' + horn_oe_dict_rule[key] + str(value) + "hg3535" + str(match_id)
-        #             sole_str = p_code + key + '0' + str(match_id) + "hg3535"
-        #             odds_only = Helper.genearte_MD5(hash_str, pt)
-        #             sole = Helper.genearte_MD5(sole_str, pt)
-        #             horn_oe_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
-        #                            "condition", "odds_only", "sole", "source", "type", "team"]
-        #             horn_oe_value = [match_id, league_id, key, "0", 0, p_code, value, horn_oe_dict_rule[key],
-        #                              odds_only, sole, "hg3535", "0", ""]
-        #             horn_oe_data = dict(zip(horn_oe_key, horn_oe_value))
-        #             data_list.append(horn_oe_data)
-        #
-        #     if pt == '3':
-        #         ris_stringscene = 1
-        #     else:
-        #         ris_stringscene = 0
-        #     odds_key = ["game_code", "title", "match_id", "lg_id", "data", "source", "odds_only", "tag", "uuid",
-        #                 "is_stringscene", "utime", "pt", 'match_identity']
-        #     odds_value = ["zq", "odds", match_id, league_id, data_list, "hg3535", odds_onlys, tag_number, uuid,
-        #                   ris_stringscene, utime, pt, match_identity]
-        #     odds_dict = dict(zip(odds_key, odds_value))
-        #     if data_list:
-        #         res = Helper.async_post(ODDS_URL, odds_dict)
-        #         if res:
-        #             if res.get('status') == 1:
-        #                 logger.info('足球角球, 详细赔率提交成功, {}'.format(res))
-        #                 # logger.info(odds_dict)
-        #             else:
-        #                 logger.warning('足球角球, 详细赔率提交失败, {}'.format(res))
-        #                 # logger.warning(odds_dict)
-        #         else:
-        #             logging.warning('足球角球, 详细赔率接口异常, {}'.format(res))
-        #     else:
-        #         logger.info('足球详细赔率列表为空')
         reactor.callFromThread(out.callback, item)

+ 0 - 62
hg3535/requirements.txt

@@ -1,62 +0,0 @@
-aiopg==0.16.0
-asn1crypto==0.24.0
-attrs==19.1.0
-Automat==0.7.0
-certifi==2019.3.9
-cffi==1.12.2
-chardet==3.0.4
-Click==7.0
-constantly==15.1.0
-cryptography==2.6.1
-cssselect==1.0.3
-defusedxml==0.5.0
-et-xmlfile==1.0.1
-Flask==1.0.2
-Flask-Login==0.4.1
-hyperlink==18.0.0
-idna==2.8
-incremental==17.5.0
-inotify==0.2.10
-itsdangerous==1.1.0
-jdcal==1.4
-Jinja2==2.10
-jmespath==0.9.4
-jsmin==2.2.2
-lxml==4.3.2
-MarkupSafe==1.1.1
-nose==1.3.7
-openpyxl==2.6.1
-parsel==1.5.1
-peewee==2.8.0
-psycopg2==2.7.7
-psycopg2-binary==2.8
-pyasn1==0.4.5
-pyasn1-modules==0.2.4
-pycparser==2.19
-pycurl==7.43.0.2
-PyDispatcher==2.0.5
-PyHamcrest==1.9.0
-PyMySQL==0.9.3
-pyOpenSSL==19.0.0
-pyquery==1.4.0
-pyspider==0.3.10
-python-dateutil==2.8.0
-pytz==2018.9
-PyYAML==3.13
-queuelib==1.5.0
-redis==3.2.1
-requests==2.21.0
-Scrapy==1.6.0
-scrapy-redis==0.6.8
-scrapy-splash==0.7.2
-service-identity==18.1.0
-six==1.12.0
-tblib==1.3.2
-tornado==4.5.3
-Twisted==18.9.0
-u-msgpack-python==2.5.1
-urllib3==1.24.1
-w3lib==1.20.0
-Werkzeug==0.14.1
-WsgiDAV==2.4.1
-zope.interface==4.6.0

+ 8 - 4
hg3535/settings.py

@@ -129,15 +129,19 @@ M_DB = 'kaiyou'
 M_PASSWORD = 'kaiyou'
 # M_PASSWORD = '123456'
 
-LEAGUE_URL = 'http://stadmin.bocai108.com:19093/setLeague'
-MATCH_URL = 'http://stadmin.bocai108.com:19093/setMatch'
-ODDS_URL = 'http://stadmin.bocai108.com:19093/setOdds'
-# ODDS_URL = 'http://stadmin.bocai108.com/setOdds'
+# LEAGUE_URL = 'http://stadmin.bocai108.com:19093/setLeague'
+LEAGUE_URL = 'http://stadmin.bocai108.com/setLeague'
+# MATCH_URL = 'http://stadmin.bocai108.com:19093/setMatch'
+MATCH_URL = 'http://stadmin.bocai108.com/setMatch'
+# ODDS_URL = 'http://stadmin.bocai108.com:19093/setOdds'
+ODDS_URL = 'http://stadmin.bocai108.com/setOdds'
 TOKEN_URL = "http://stadmin.bocai108.com/getToken"
 MATCH_RESULT = "http://stadmin.bocai108.com:19093/setMatchResult"
 MATCH_STATUS = "http://stadmin.bocai108.com:19093/upMatch"
+# MATCH_STATUS = "http://stadmin.bocai108.com/upMatch"
 ODDSCH = "http://stadmin.bocai108.com:19093/setOddsCH"
 SAIGUO_RESULT = "http://stadmin.bocai108.com:19093/setResultExpress"
+# SAIGUO_RESULT = "http://stadmin.bocai108.com/setResultExpress"
 MATCHWARN = "http://stadmin.bocai108.com:19093/setMatchWarn"
 
 R_HOST = '192.168.2.200'

+ 0 - 52
hg3535/spiders/bangqiu.py

@@ -2,7 +2,6 @@
 import copy
 import datetime
 import json
-import time
 import redis
 import scrapy
 from scrapy.http import Request
@@ -43,8 +42,6 @@ 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.yonghuai5515.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)
@@ -73,7 +70,6 @@ class BqrangqiuSpider(scrapy.Spider):
             item = Bangqiu()
             for result in new_data:
                 if result['pci']["ctid"] == 0:
-
                     # 比赛id
                     game_id = str(result['k'])
                     # 球队1
@@ -236,51 +232,3 @@ class BqrangqiuSpider(scrapy.Spider):
                     item['odd_evens_dict_rule'] = odd_evens_dict_rule
                     item['bangqiu'] = bangqiu
                     yield item
-
-            #     if result['pci']['ctid'] is 208:
-            #         """球队得分大/小  主队"""
-            #         team_score_home_dict = {}
-            #         team_score_home_rule_dict = {}
-            #         try:
-            #             team_score_home = result['o']['ou']['v']
-            #             team_score_home_rule_dict['team_score_big'] = team_score_home[1]
-            #             team_score_home_rule_dict['team_score_small'] = team_score_home[3]
-            #             if pt is 3:
-            #                 team_score_home_dict['team_score_big'] = float(team_score_home[5]) - 1
-            #                 team_score_home_dict['team_score_small'] = float(team_score_home[7]) - 1
-            #             else:
-            #                 team_score_home_dict['team_score_big'] = team_score_home[5]
-            #                 team_score_home_dict['team_score_small'] = team_score_home[7]
-            #         except:
-            #             team_score_home_dict['team_score_big'] = ''
-            #             team_score_home_rule_dict['team_score_big'] = ''
-            #             team_score_home_dict['team_score_small'] = ''
-            #             team_score_home_rule_dict['team_score_small'] = ''
-            #         # 球队得分大/小  主队
-            #         item['team_score_home_dict'] = team_score_home_dict
-            #         item['team_score_home_rule_dict'] = team_score_home_rule_dict
-            #
-            #     if result['pci']['ctid'] is 209:
-            #         """球队得分大/小  客队"""
-            #         team_score_guest_dict = {}
-            #         team_score_guest_rule_dict = {}
-            #         try:
-            #             team_score_guest = result['o']['ou']['v']
-            #             team_score_guest_rule_dict['team_score_big'] = team_score_guest[1]
-            #             team_score_guest_rule_dict['team_score_small'] = team_score_guest[3]
-            #             if pt is 3:
-            #                 team_score_guest_dict['team_score_big'] = float(team_score_guest[5]) - 1
-            #                 team_score_guest_dict['team_score_small'] = float(team_score_guest[7]) - 1
-            #             else:
-            #                 team_score_guest_dict['team_score_big'] = team_score_guest[5]
-            #                 team_score_guest_dict['team_score_small'] = team_score_guest[7]
-            #         except:
-            #             team_score_guest_dict['team_score_big'] = ''
-            #             team_score_guest_rule_dict['team_score_big'] = ''
-            #             team_score_guest_dict['team_score_small'] = ''
-            #             team_score_guest_rule_dict['team_score_small'] = ''
-            #         # 球队得分大/小  客队
-            #         item['team_score_guest_dict'] = team_score_guest_dict
-            #         item['team_score_guest_rule_dict'] = team_score_guest_rule_dict
-            #
-            # yield item

+ 0 - 2
hg3535/spiders/guanjun.py

@@ -1,5 +1,4 @@
 # -*- coding: utf-8 -*-
-# import copy
 import datetime
 import json
 
@@ -28,7 +27,6 @@ class LqguanjunSpider(scrapy.Spider):
             for x in range(0, 4):
                 # for y in range()
                 url = 'https://odata.yonghuai5515.com/odds6i/d/getodds/zh-cn/sid/{}/pt/1/ubt/or/pn/{}/sb/2/dc/null/pid/0'.format(z, x)
-                # redis_key = "guanjun: start_urls"
                 yield Request(url=url, callback=self.parse, dont_filter=True)
 
     def parse(self, response):

+ 8 - 8
hg3535/spiders/jieshu.py

@@ -1,6 +1,7 @@
+# encoding: utf-8
+
 import datetime
 import json
-# import re
 import logging
 
 import redis
@@ -24,17 +25,16 @@ 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)
-        # 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)
+                yield scrapy.Request(url=url, callback=self.parse, dont_filter=True, meta={'ctime': ctime})
 
     def parse(self, response):
         logger = logging.getLogger(__name__)
+        ctime = response.meta['ctime']
         try:
             data = json.loads(response.text)
             status = data['i'][0]
@@ -43,7 +43,7 @@ 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 = ctime
             item = Hgjieshu()
             item['ball'] = ball
             item['match_id'] = match_id

+ 1 - 4
hg3535/spiders/lanqiu.py

@@ -1,9 +1,8 @@
 # -*- coding: utf-8 -*-
+
 import copy
 import datetime
 import json
-import time
-
 import redis
 import scrapy
 from scrapy.http import Request
@@ -74,8 +73,6 @@ 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()) + '&' + 'lq'
-                        self.rls.hset('hg3535.ball.ids', game_id, up_time)
                         if pt == 1:
                             url = "https://odata.yonghuai5515.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)

+ 0 - 67
hg3535/spiders/liansai.py

@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-import datetime
-import json
-
-import requests
-import scrapy
-
-# from scrapy.http import Request
-
-from .. items import Liansai
-
-
-class LanqiulsSpider(scrapy.Spider):
-    name = 'liansai'
-    to_day = datetime.datetime.now()
-    allowed_domains = ['hg3535z.com']
-    custom_settings = {
-        "ITEM_PIPELINES": {
-            'hg3535.pipeline.Liansaipipeline': 300,
-        },
-        # 'LOG_LEVEL': 'DEBUG',
-        # 'LOG_FILE': "../hg3535/log/liansai_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
-    }
-
-    def start_requests(self):
-        gj_list = ['am', 'or']
-        for y in range(1, 5):
-            for i in range(1, 5):
-                for z in gj_list:
-                    url = 'https://hg3535z.com/odds2/d/getcomps?sid='+str(y)+'&pt=' + str(i) + '&ubt=' + z +'&dc=null&pn=0&pid=0'
-                    yield scrapy.Request(url=url, callback=self.parse, dont_filter=True)
-
-    def parse(self, response):
-        try:
-            datas = json.loads(response.text)['gs']
-        except:
-            datas = ""
-        if datas:
-            for data in datas:
-                # 区域id,欧洲
-                area_id = data['gid']
-                # 区域名,欧洲
-                area_name = data['gn']
-                new_data = data['fc']
-                if new_data:
-                    for i in new_data:
-                        item = Liansai()
-                        ball = json.loads(response.text)['s']
-                        st_league = i["id"]
-                        name_chinese = i['nm']
-                        item['area_id'] = area_id
-                        item['area_name'] = area_name
-                        item['st_league'] = st_league
-                        item['name_chinese'] = name_chinese
-                        item['ball'] = ball
-                        yield item
-
-
-
-
-
-
-
-
-
-
-

+ 2 - 3
hg3535/spiders/roll_bangqiu.py

@@ -32,9 +32,8 @@ 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)
+                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):

+ 2 - 4
hg3535/spiders/roll_lanqiu.py

@@ -1,7 +1,6 @@
 # -*- coding: utf-8 -*-
 import datetime
 import json
-# import jsonpath
 import time
 
 import redis
@@ -67,9 +66,8 @@ 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)
+                            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:

+ 2 - 3
hg3535/spiders/roll_wangqiu.py

@@ -64,9 +64,8 @@ class WangqiuSpider(scrapy.Spider):
                 urls = 'https://odata.yonghuai5515.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(id)
                 # 玩法规则
                 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)
+                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):

+ 4 - 8
hg3535/spiders/roll_zuqiu.py

@@ -1,11 +1,8 @@
 # -*- coding: utf-8 -*-
-# import copy
+
 import datetime
 import json
-
-# import jsonpath
 import time
-
 import redis
 import scrapy
 from scrapy.http import Request
@@ -25,7 +22,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.yonghuai5515.com/odds6i/d/getodds/zh-cn/sid/1/pt/4/ubt/am/pn/0/sb/2/dc/null/pid/0']
-    # rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
+    rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
 
     def parse(self, response):
         responses = json.loads(response.text)
@@ -42,9 +39,8 @@ 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)
+                            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_each, dont_filter=True)
                 else:

+ 3 - 4
hg3535/spiders/saiguo.py

@@ -1,3 +1,6 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
 import datetime
 import re
 
@@ -54,10 +57,6 @@ class HgjieshuSpider(scrapy.Spider):
                         h_scores = data.xpath('.//div[contains(@class, "rt-ht ")]')
                         # 时间
                         stimes = data.xpath('//div[@class="rt-event"]/../div[1]/span/text()')
-                        # 子集玩法
-                        # odd_names = data.xpath('//div[@class="rt-sub rt-data-hide"]/table/tbody[2]/tr/td[2]')
-                        # 子集玩法结果
-                        # odd_plays = data.xpath('//div[@class="rt-sub rt-data-hide"]/table/tbody[2]/tr/td[3]/span')
                         match_ids = data.xpath('//div[@class="flex-wrap"]/../div[1]/@id')
                         odd_datas = data.xpath('//div[contains(@class, "rt-sub ")]/table/tbody[2]')
                         for y in range(len(odd_datas)):

+ 2 - 9
hg3535/spiders/wangqiu.py

@@ -1,16 +1,11 @@
 # -*- coding: utf-8 -*-
-# -*- coding: utf-8 -*-
+
 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):
@@ -24,7 +19,7 @@ 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)
+    # 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):
@@ -46,8 +41,6 @@ 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.yonghuai5515.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)

+ 0 - 115
hg3535/spiders/wqbodan.py

@@ -1,115 +0,0 @@
-# -*- coding: utf-8 -*-
-import copy
-import datetime
-import json
-
-import scrapy
-
-from scrapy.http import Request
-
-from ..items import Wqbodan
-
-
-class WgbodanSpider(scrapy.Spider):
-    name = 'wqbodan'
-    to_day = datetime.datetime.now()
-    allowed_domains = ['hg3535z.com']
-    custom_settings = {
-        "ITEM_PIPELINES": {
-            'hg3535.pipeline.Wqbodanpipeline': 300,
-        },
-        # 'LOG_LEVEL': 'DEBUG',
-        # 'LOG_FILE': "../hg3535/log/wqbodan_{}_{}_{}.log".format(to_day.year, to_day.month, to_day.day)
-    }
-
-    def start_requests(self):
-        url = 'https://hg3535z.com/odds2/d/getmenu?pid=0'
-        yield scrapy.Request(url=url, callback=self.parse_one, dont_filter=True)
-
-    def parse_one(self, response):
-        for y in range(1, 4):
-            url = 'https://hg3535z.com/odds2/d/getodds?sid=3&pt=' + str(y) + '&ubt=stcs&pn=0&sb=2&dc=null&pid=0'
-            yield Request(url=url, callback=self.parse, meta={'pt': y}, dont_filter=True)
-
-    def parse(self, response):
-        try:
-            datas = json.loads(response.text)
-        except:
-            datas = ""
-        try:
-            results = datas['n-ot']['egs']
-        except:
-            results = ""
-        try:
-            pt = copy.copy(response.meta['pt'])
-        except:
-            pt = 0
-        if results:
-            for result in results:
-                # 联赛id
-                league_id = result['c']['k']
-                # 联赛名
-                league_name = result['c']['n']
-                new_results = result['es']
-                for new_result in new_results:
-                    item = Wqbodan()
-                    # 比赛id
-                    game_id = str(new_result['i'][16])
-                    # 球队1
-                    team_home = new_result['i'][0]
-                    # 球队2
-                    team_guest = new_result['i'][1]
-                    # 数量(97>)
-                    number = new_result['i'][2]
-                    # 状态
-                    zhuangtai = new_result['i'][3]
-                    # 日期
-                    data_game = new_result['i'][4]
-                    # 开赛时间
-                    time_game = new_result['i'][5]
-                    # 队1分数
-                    score_home = new_result['i'][10]
-                    # 队2分数
-                    score_guest = new_result['i'][11]
-                    # 下半场
-                    half_way = new_result['i'][12]
-                    # 角球或者其他
-                    corner_ball = new_result['pci'].get('ctn', "")
-                    bodan_data = {}
-                    # 波胆
-                    bodans = new_result['o'].get('sb', "")
-                    if bodans:
-                        one_list = ["bodanhome_two_zero", "bodanhome_two_one", "bodanhome_three_zero",
-                                    "bodanhome_three_one", "bodanhome_three_two", "bodanhome_four_zero",
-                                    "bodanhome_four_one", "bodanhome_four_two", "bodanhome_four_three"]
-                        two_list = ["bodanguest_two_zero", "bodanguest_two_one", "bodanguest_three_zero",
-                                    "bodanguest_three_one", "bodanguest_three_two", "bodanguest_four_zero",
-                                    "bodanguest_four_one", "bodanguest_four_two", "bodanguest_four_three"]
-
-                        new_bodans = [bodans[i] for i in range(len(bodans)) if i % 2 == 1]
-                        # 主队bodan_home
-                        bodan_home = [new_bodans[i] for i in range(len(new_bodans)) if i % 2 == 0]
-                        for index, t in enumerate(one_list):
-                            bodan_data[t] = bodan_home[index]
-                        # 客队bodan_guest
-                        bodan_guest = [new_bodans[i] for i in range(len(new_bodans)) if i % 2 == 1]
-                        for y, z in enumerate(two_list):
-                            bodan_data[z] = bodan_guest[y]
-                    item['league_id'] = league_id
-                    item['league_name'] = league_name
-                    item['game_id'] = game_id
-                    item['team_home'] = team_home
-                    item['team_guest'] = team_guest
-                    item['number'] = number
-                    item['data_game'] = data_game
-                    item['time_game'] = time_game
-                    item['corner_ball'] = corner_ball
-                    item['score_home'] = score_home
-                    item['score_guest'] = score_guest
-                    item['half_way'] = half_way
-                    item['pt'] = pt
-                    item['zhuangtai'] = zhuangtai
-                    item['bodan_data'] = bodan_data
-                    yield item
-
-

+ 13 - 10
hg3535/spiders/zhibo.py

@@ -1,11 +1,8 @@
 # -*- coding: utf-8 -*-
-# import copy
-import datetime
-import json
 
-# import jsonpath
-# import time
 
+import datetime
+import json
 import redis
 import scrapy
 from scrapy.http import Request
@@ -72,7 +69,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']
@@ -89,7 +86,12 @@ class ZuqiuSpider(scrapy.Spider):
                         event_name = match_event['name']
                         event_uts = match_event['uts']
                         # updated_uts = match_event['updated_uts']
-                        list_ball.append((team_name, event_name, event_uts))
+                        # if match_event['card'] == 'red':
+                        #     warn_type = 2
+                        # else:
+                        #     warn_type = ''
+                        warn_type = 2
+                        list_ball.append((team_name, event_name, event_uts, warn_type))
                     elif event_type == 'goal':
                         print('有进球, 事件')
                         event_team = match_event['team']
@@ -99,7 +101,8 @@ class ZuqiuSpider(scrapy.Spider):
                         event_name = match_event['name']
                         event_uts = match_event['uts']
                         # updated_uts = match_event['updated_uts']
-                        list_ball.append((team_name, event_name, event_uts))
+                        warn_type = 1
+                        list_ball.append((team_name, event_name, event_uts, warn_type))
                     elif event_type == 'corner':
                         print('有角球, 事件')
                         event_team = match_event['team']
@@ -108,8 +111,8 @@ class ZuqiuSpider(scrapy.Spider):
                         # event_time = match_event['time']
                         event_name = match_event['name']
                         event_uts = match_event['uts']
-                        # updated_uts = match_event['updated_uts']
-                        list_ball.append((team_name, event_name, event_uts))
+                        warn_type = 3
+                        list_ball.append((team_name, event_name, event_uts, warn_type))
                 if list_ball:
                     item = FTzhibo()
                     item['detail'] = list_ball

+ 4 - 6
hg3535/spiders/zuqiu.py

@@ -1,10 +1,8 @@
 # -*- coding: utf-8 -*-
+
 import copy
 import json
-
-# import redis
 import time
-
 import redis
 import scrapy
 from scrapy.http import Request
@@ -12,6 +10,7 @@ from ..items import Zuqiu
 import datetime
 from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
 
+
 class ZuqiuSpider(scrapy.Spider):
     name = 'zuqiu'
     to_day = datetime.datetime.now()
@@ -24,7 +23,7 @@ class ZuqiuSpider(scrapy.Spider):
         # 'LOG_LEVEL': 'DEBUG',
         # 'LOG_FILE': "./log/zuqiu_{}_{}_{}.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)
+    # 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):
@@ -47,7 +46,7 @@ class ZuqiuSpider(scrapy.Spider):
                     for new_result in new_results:
                         game_id = new_result['k']
                         up_time = str(time.time()) + '&' + 'zq'
-                        self.rls.hset('hg3535.ball.ids', game_id, up_time)
+                        # self.rls.hset('hg3535.ball.ids', game_id, up_time)
                         if pt == 3:
                             url = "https://odata.yonghuai5515.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})
@@ -555,5 +554,4 @@ class ZuqiuSpider(scrapy.Spider):
                 item['horn_oe_dict'] = horn_oe_dict
                 item['horn_oe_dict_rule'] = horn_oe_dict_rule
                 item['horn_team'] = horn_team
-                # item['zuqiu'] = zuqiu
                 yield item

+ 1 - 0
hg3535/utils/LocalToken.py

@@ -0,0 +1 @@
+token = {'token': 'mVUm5Y15717377705daed0aad4869', 'username': 'python', 'password': 'python888', 'token_url': 'http://stadmin.bocai108.com/getToken'}

+ 12 - 14
hg3535/utils/helper.py

@@ -1,31 +1,30 @@
 import hashlib
 import json
-# import requests
 from requests_futures.sessions import FuturesSession
 from .langconv import *
+from .LocalToken import token
+
 
 class Helper(object):
     @staticmethod
     def async_post(url, params):
-        # try:
-        #     fs_session = FuturesSession()
-        #     data = fs_session.post(url, data={"data": json.dumps(params), "token": "u4Gdf015662654065d5b503ea2517"}, timeout=180).result()
-        #     if data:
-        #         return data.content.decode('utf-8')
-        # except requests.exceptions.RequestException as e:
-        #     print(e)
         fs_session = FuturesSession()
-        data = fs_session.post(url, data={"data": json.dumps(params), "token": "u4Gdf015662654065d5b503ea2517"}, timeout=180).result()
+        t_url, t_user, t_password, t_token = token['token_url'], token['username'], token['password'], token['token']
+        data = fs_session.post(url, data={"data": json.dumps(params), "token": t_token}, timeout=180).result()
         try:
             new_data = data.json()
+            if new_data.get('status') == 6:
+                t_data = fs_session.post(url=t_url, data={'account': t_user, 'password': t_password}).result()
+                if t_data.json().get('status') == 1:
+                    g_token = t_data.json()['data']['token']
+                    token['token'] = g_token
+                    with open('./utils/LocalToken.py', 'w+', encoding='utf8') as f:
+                        f.write('token = {}'.format(token))
         except Exception as e:
             print(e)
             new_data = {"status": 0, "msg": "接口返回异常", "data": []}
         return new_data
 
-
-
-
     @staticmethod
     def genearte_MD5(params, pt):
         # 创建md5对象
@@ -45,6 +44,5 @@ class Helper(object):
         # 繁体
         # line = Converter("zh-hant").convert(params).replace(' ', '')
         hl = hashlib.md5()
-        hl = hashlib.md5()
-        hl.update(params.encode(encoding='utf-8'))
+        hl.update(line.encode(encoding='utf-8'))
         return hl.hexdigest()