Bläddra i källkod

保存入库回调带上请求头

莺声燕语 2 år sedan
förälder
incheckning
c76929b6b3
6 ändrade filer med 175 tillägg och 149 borttagningar
  1. 143 133
      .idea/workspace.xml
  2. 4 2
      ceshi.py
  3. 1 1
      structure/danti_structure.py
  4. 3 3
      structure/structure_main.py
  5. 3 3
      utils/html_again_parse.py
  6. 21 7
      utils/ruku_opera.py

+ 143 - 133
.idea/workspace.xml

@@ -2,13 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="264b59ce-0122-420f-a5d3-3ffa8b015ccb" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/configs.py" beforeDir="false" afterPath="$PROJECT_DIR$/configs.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/ceshi.py" beforeDir="false" afterPath="$PROJECT_DIR$/ceshi.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/structure/danti_structure.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/danti_structure.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/structure/dati2slave.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/dati2slave.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/structure/option.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/option.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/structure/structure_main.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/structure_main.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/utils/item_type_line.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/item_type_line.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/utils/html_again_parse.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/html_again_parse.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/utils/ruku_opera.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/ruku_opera.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -38,8 +35,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/structure/structure_main.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="275">
-              <caret line="142" column="29" lean-forward="true" selection-start-line="142" selection-start-column="29" selection-end-line="142" selection-end-column="29" />
+            <state relative-caret-position="119">
+              <caret line="218" selection-start-line="218" selection-end-line="218" />
               <folding>
                 <element signature="e#47#72#0" expanded="true" />
                 <element signature="e#4704#4745#0" />
@@ -50,73 +47,75 @@
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/pic_pos_judge.py">
+        <entry file="file://$PROJECT_DIR$/utils/html_again_parse.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2176">
-              <caret line="64" selection-start-line="64" selection-end-line="64" />
+            <state relative-caret-position="204">
+              <caret line="160" lean-forward="true" selection-start-line="160" selection-end-line="160" />
               <folding>
-                <marker date="1655779633177" expanded="true" signature="95:100" ph="..." />
+                <element signature="e#24#33#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/structure/stems_structure.py">
+        <entry file="file://$PROJECT_DIR$/structure/dati2slave.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1190">
-              <caret line="37" column="59" selection-start-line="37" selection-start-column="59" selection-end-line="37" selection-end-column="59" />
+            <state relative-caret-position="303">
+              <caret line="172" column="38" lean-forward="true" selection-start-line="172" selection-start-column="38" selection-end-line="172" selection-end-column="38" />
               <folding>
-                <element signature="e#3569#3576#0" />
+                <element signature="e#46#55#0" expanded="true" />
+                <element signature="e#5987#6021#0" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/structure/dati2slave.py">
+        <entry file="file://$PROJECT_DIR$/structure/final_structure.py">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="99">
-              <caret line="172" column="38" lean-forward="true" selection-start-line="172" selection-start-column="38" selection-end-line="172" selection-end-column="38" />
+              <caret line="85" selection-start-line="85" selection-end-line="85" />
               <folding>
-                <element signature="e#46#55#0" expanded="true" />
-                <element signature="e#5987#6021#0" />
+                <element signature="e#11#20#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/structure/final_structure.py">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/utils/ruku_opera.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="238">
-              <caret line="94" column="7" selection-start-line="94" selection-start-column="7" selection-end-line="94" selection-end-column="7" />
+            <state relative-caret-position="138">
+              <caret line="506" column="26" selection-start-line="506" selection-start-column="22" selection-end-line="506" selection-end-column="26" />
               <folding>
-                <element signature="e#11#20#0" expanded="true" />
+                <element signature="e#24#46#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/configs.py">
+        <entry file="file://$PROJECT_DIR$/utils/ruku_test.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="191">
-              <caret line="111" column="59" selection-start-line="111" selection-start-column="59" selection-end-line="111" selection-end-column="59" />
+            <state relative-caret-position="616">
+              <caret line="859" column="41" lean-forward="true" selection-start-line="859" selection-start-column="41" selection-end-line="859" selection-end-column="41" />
               <folding>
-                <element signature="e#46#60#0" expanded="true" />
+                <element signature="e#24#46#0" expanded="true" />
+                <element signature="e#1334#4074#0" />
+                <element signature="e#2169#2246#0" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/utils/ruku_opera.py">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/ceshi.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="314">
-              <caret line="507" column="16" lean-forward="true" selection-start-line="507" selection-start-column="16" selection-end-line="507" selection-end-column="16" />
+            <state relative-caret-position="203">
+              <caret line="233" column="32" lean-forward="true" selection-start-line="233" selection-start-column="32" selection-end-line="233" selection-end-column="32" />
               <folding>
-                <element signature="e#24#46#0" expanded="true" />
+                <element signature="e#47#96#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -125,8 +124,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/utils/washutil.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-353">
-              <caret line="736" column="4" selection-start-line="736" selection-start-column="4" selection-end-line="736" selection-end-column="4" />
+            <state relative-caret-position="120">
+              <caret line="346" column="25" lean-forward="true" selection-start-line="346" selection-start-column="25" selection-end-line="346" selection-end-column="25" />
               <folding>
                 <element signature="e#138#153#0" expanded="true" />
               </folding>
@@ -137,8 +136,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/server.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="280">
-              <caret line="148" column="27" lean-forward="true" selection-start-line="148" selection-start-column="27" selection-end-line="148" selection-end-column="27" />
+            <state relative-caret-position="-345">
+              <caret line="72" column="36" lean-forward="true" selection-start-line="72" selection-start-column="36" selection-end-line="72" selection-end-column="36" />
               <folding>
                 <element signature="e#105#118#0" expanded="true" />
               </folding>
@@ -149,8 +148,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/structure/danti_structure.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="171">
-              <caret line="16" column="46" lean-forward="true" selection-start-line="16" selection-start-column="46" selection-end-line="16" selection-end-column="46" />
+            <state relative-caret-position="34">
+              <caret line="31" column="20" lean-forward="true" selection-start-line="31" selection-start-column="20" selection-end-line="31" selection-end-column="20" />
               <folding>
                 <element signature="e#64#73#0" expanded="true" />
               </folding>
@@ -169,11 +168,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>item_id</find>
-      <find>tr</find>
-      <find>callback_user</find>
-      <find>&lt;td</find>
-      <find>&quot;#&quot;</find>
       <find>is_danti</find>
       <find>选项格式不正确</find>
       <find>susp_pic</find>
@@ -199,6 +193,11 @@
       <find>判断题</find>
       <find>12</find>
       <find>正确</find>
+      <find>repeat_check</find>
+      <find>print</find>
+      <find>data</find>
+      <find>9f</find>
+      <find>post</find>
     </findStrings>
     <replaceStrings>
       <replace>cur_type</replace>
@@ -270,16 +269,16 @@
         <option value="$PROJECT_DIR$/structure/three_parse_structure.py" />
         <option value="$PROJECT_DIR$/utils/pic_pos_judge.py" />
         <option value="$PROJECT_DIR$/server.py" />
-        <option value="$PROJECT_DIR$/utils/html_again_parse.py" />
-        <option value="$PROJECT_DIR$/ceshi.py" />
         <option value="$PROJECT_DIR$/utils/washutil.py" />
         <option value="$PROJECT_DIR$/structure/ans_structure.py" />
         <option value="$PROJECT_DIR$/utils/item_type_line.py" />
-        <option value="$PROJECT_DIR$/structure/danti_structure.py" />
         <option value="$PROJECT_DIR$/structure/option.py" />
-        <option value="$PROJECT_DIR$/structure/structure_main.py" />
         <option value="$PROJECT_DIR$/configs.py" />
         <option value="$PROJECT_DIR$/structure/dati2slave.py" />
+        <option value="$PROJECT_DIR$/structure/danti_structure.py" />
+        <option value="$PROJECT_DIR$/structure/structure_main.py" />
+        <option value="$PROJECT_DIR$/utils/html_again_parse.py" />
+        <option value="$PROJECT_DIR$/ceshi.py" />
         <option value="$PROJECT_DIR$/utils/ruku_opera.py" />
       </list>
     </option>
@@ -291,10 +290,10 @@
     <sorting>DEFINITION_ORDER</sorting>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="1" />
-    <option name="y" value="1" />
-    <option name="width" value="1678" />
-    <option name="height" value="1008" />
+    <option name="x" value="-8" />
+    <option name="y" value="-8" />
+    <option name="width" value="1936" />
+    <option name="height" value="1096" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -362,7 +361,7 @@
       </list>
     </option>
   </component>
-  <component name="RunManager" selected="Python.server">
+  <component name="RunManager" selected="Python.ceshi">
     <configuration name="ceshi" type="PythonConfigurationType" factoryName="Python" temporary="true">
       <module name="parse_online58" />
       <option name="INTERPRETER_OPTIONS" value="" />
@@ -484,18 +483,18 @@
       <method v="2" />
     </configuration>
     <list>
-      <item itemvalue="Python.server" />
-      <item itemvalue="Python.structure_main" />
       <item itemvalue="Python.ceshi" />
       <item itemvalue="Python.danti_structure" />
       <item itemvalue="Python.html_again_parse" />
+      <item itemvalue="Python.server" />
+      <item itemvalue="Python.structure_main" />
     </list>
     <recent_temporary>
       <list>
         <item itemvalue="Python.server" />
+        <item itemvalue="Python.ceshi" />
         <item itemvalue="Python.structure_main" />
         <item itemvalue="Python.danti_structure" />
-        <item itemvalue="Python.ceshi" />
         <item itemvalue="Python.html_again_parse" />
       </list>
     </recent_temporary>
@@ -777,7 +776,14 @@
       <option name="project" value="LOCAL" />
       <updated>1657107984510</updated>
     </task>
-    <option name="localTasksCounter" value="39" />
+    <task id="LOCAL-00039" summary="判断题更新">
+      <created>1659608749818</created>
+      <option name="number" value="00039" />
+      <option name="presentableId" value="LOCAL-00039" />
+      <option name="project" value="LOCAL" />
+      <updated>1659608749818</updated>
+    </task>
+    <option name="localTasksCounter" value="40" />
     <servers />
   </component>
   <component name="TodoView">
@@ -793,14 +799,14 @@
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.4985591" visible="true" weight="0.14399575" />
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.4985591" visible="true" weight="0.21360256" />
       <window_info id="Structure" order="1" sideWeight="0.50144094" side_tool="true" weight="0.15773447" />
       <window_info id="Favorites" order="2" sideWeight="0.50144094" side_tool="true" weight="0.15773447" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.499391" visible="true" weight="0.21551724" />
+      <window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.499391" visible="true" weight="0.30418718" />
       <window_info anchor="bottom" id="Terminal" order="3" weight="0.13423645" />
-      <window_info anchor="bottom" id="Debug" order="4" sideWeight="0.499391" weight="0.10098522" />
+      <window_info anchor="bottom" id="Debug" order="4" sideWeight="0.499391" weight="0.34852216" />
       <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="7" weight="0.32881773" />
@@ -843,7 +849,6 @@
     <option name="version" value="1" />
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="日志输出调整为json格式" />
     <MESSAGE value="单题解析中对&amp;nbsp;清洗" />
     <MESSAGE value="css清洗中保留下划线特征、日志格式更新" />
     <MESSAGE value="htmlwash中保留“&lt;td rowspan”标签" />
@@ -868,7 +873,8 @@
     <MESSAGE value="带小问题目的公共解析提取细节修改" />
     <MESSAGE value="取消从解析中自动提取答案" />
     <MESSAGE value="option_label_correct中修改con_list2的bug" />
-    <option name="LAST_COMMIT_MESSAGE" value="option_label_correct中修改con_list2的bug" />
+    <MESSAGE value="判断题更新" />
+    <option name="LAST_COMMIT_MESSAGE" value="判断题更新" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
@@ -880,7 +886,7 @@
         </line-breakpoint>
         <line-breakpoint suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/utils/ruku_opera.py</url>
-          <line>838</line>
+          <line>852</line>
           <option name="timeStamp" value="131" />
         </line-breakpoint>
         <line-breakpoint suspend="THREAD" type="python-line">
@@ -950,7 +956,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/utils/ruku_opera.py</url>
-          <line>848</line>
+          <line>862</line>
           <option name="timeStamp" value="197" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -978,11 +984,6 @@
           <line>91</line>
           <option name="timeStamp" value="231" />
         </line-breakpoint>
-        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
-          <url>file://$PROJECT_DIR$/structure/structure_main.py</url>
-          <line>139</line>
-          <option name="timeStamp" value="233" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/structure/option.py</url>
           <line>160</line>
@@ -993,6 +994,16 @@
           <line>41</line>
           <option name="timeStamp" value="237" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/utils/washutil.py</url>
+          <line>189</line>
+          <option name="timeStamp" value="238" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/utils/html_again_parse.py</url>
+          <line>82</line>
+          <option name="timeStamp" value="240" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
     <watches-manager>
@@ -1208,19 +1219,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/ruku_test.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="174">
-          <caret line="141" column="41" lean-forward="true" selection-start-line="141" selection-start-column="41" selection-end-line="141" selection-end-column="41" />
-          <folding>
-            <element signature="e#24#46#0" expanded="true" />
-            <element signature="e#1334#4074#0" />
-            <element signature="e#2169#2246#0" />
-            <element signature="e#47222#47287#0" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/utils/topic_no.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-328">
@@ -1262,16 +1260,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/ceshi.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="320">
-          <caret line="221" column="67" selection-start-line="221" selection-start-column="67" selection-end-line="221" selection-end-column="67" />
-          <folding>
-            <element signature="e#47#96#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/structure/ans_structure.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="339">
@@ -1299,16 +1287,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/html_again_parse.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="139">
-          <caret line="162" selection-start-line="162" selection-end-line="162" />
-          <folding>
-            <element signature="e#24#33#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/logs/structure_log.txt">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
@@ -1357,38 +1335,29 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/configs.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="191">
-          <caret line="111" column="59" selection-start-line="111" selection-start-column="59" selection-end-line="111" selection-end-column="59" />
+        <state relative-caret-position="55">
+          <caret line="113" lean-forward="true" selection-start-line="113" selection-end-line="113" />
           <folding>
             <element signature="e#46#60#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/server.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="280">
-          <caret line="148" column="27" lean-forward="true" selection-start-line="148" selection-start-column="27" selection-end-line="148" selection-end-column="27" />
-          <folding>
-            <element signature="e#105#118#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/structure/danti_structure.py">
+    <entry file="file://$PROJECT_DIR$/structure/dati2slave.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="171">
-          <caret line="16" column="46" lean-forward="true" selection-start-line="16" selection-start-column="46" selection-end-line="16" selection-end-column="46" />
+        <state relative-caret-position="303">
+          <caret line="172" column="38" lean-forward="true" selection-start-line="172" selection-start-column="38" selection-end-line="172" selection-end-column="38" />
           <folding>
-            <element signature="e#64#73#0" expanded="true" />
+            <element signature="e#46#55#0" expanded="true" />
+            <element signature="e#5987#6021#0" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/structure/final_structure.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="238">
-          <caret line="94" column="7" selection-start-line="94" selection-start-column="7" selection-end-line="94" selection-end-column="7" />
+        <state relative-caret-position="99">
+          <caret line="85" selection-start-line="85" selection-end-line="85" />
           <folding>
             <element signature="e#11#20#0" expanded="true" />
           </folding>
@@ -1397,8 +1366,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/structure/structure_main.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="275">
-          <caret line="142" column="29" lean-forward="true" selection-start-line="142" selection-start-column="29" selection-end-line="142" selection-end-column="29" />
+        <state relative-caret-position="119">
+          <caret line="218" selection-start-line="218" selection-end-line="218" />
           <folding>
             <element signature="e#47#72#0" expanded="true" />
             <element signature="e#4704#4745#0" />
@@ -1407,31 +1376,72 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/washutil.py">
+    <entry file="file://$PROJECT_DIR$/utils/html_again_parse.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-353">
-          <caret line="736" column="4" selection-start-line="736" selection-start-column="4" selection-end-line="736" selection-end-column="4" />
+        <state relative-caret-position="204">
+          <caret line="160" lean-forward="true" selection-start-line="160" selection-end-line="160" />
           <folding>
-            <element signature="e#138#153#0" expanded="true" />
+            <element signature="e#24#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/dati2slave.py">
+    <entry file="file://$PROJECT_DIR$/utils/ruku_test.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="99">
-          <caret line="172" column="38" lean-forward="true" selection-start-line="172" selection-start-column="38" selection-end-line="172" selection-end-column="38" />
+        <state relative-caret-position="616">
+          <caret line="859" column="41" lean-forward="true" selection-start-line="859" selection-start-column="41" selection-end-line="859" selection-end-column="41" />
           <folding>
-            <element signature="e#46#55#0" expanded="true" />
-            <element signature="e#5987#6021#0" />
+            <element signature="e#24#46#0" expanded="true" />
+            <element signature="e#1334#4074#0" />
+            <element signature="e#2169#2246#0" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/ceshi.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="203">
+          <caret line="233" column="32" lean-forward="true" selection-start-line="233" selection-start-column="32" selection-end-line="233" selection-end-column="32" />
+          <folding>
+            <element signature="e#47#96#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/server.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-345">
+          <caret line="72" column="36" lean-forward="true" selection-start-line="72" selection-start-column="36" selection-end-line="72" selection-end-column="36" />
+          <folding>
+            <element signature="e#105#118#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/structure/danti_structure.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="34">
+          <caret line="31" column="20" lean-forward="true" selection-start-line="31" selection-start-column="20" selection-end-line="31" selection-end-column="20" />
+          <folding>
+            <element signature="e#64#73#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/washutil.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="120">
+          <caret line="346" column="25" lean-forward="true" selection-start-line="346" selection-start-column="25" selection-end-line="346" selection-end-column="25" />
+          <folding>
+            <element signature="e#138#153#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/utils/ruku_opera.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="314">
-          <caret line="507" column="16" lean-forward="true" selection-start-line="507" selection-start-column="16" selection-end-line="507" selection-end-column="16" />
+        <state relative-caret-position="138">
+          <caret line="506" column="26" selection-start-line="506" selection-start-column="22" selection-end-line="506" selection-end-column="26" />
           <folding>
             <element signature="e#24#46#0" expanded="true" />
           </folding>

+ 4 - 2
ceshi.py

@@ -228,5 +228,7 @@ import configs
 repeat_ip = "http://82.156.68.22:8888/repeat/subject"  # 全学科查重
 # repeat_r = requests.post(url=configs.repeat_ip, json={"topics":[chachong_item_dict2],
 #                                                       "callback":"http://192.168.1.140:8888/kk"})
-repeat_r = requests.post(url=configs.repeat_ip, json=[chachong_item_dict1])
-print(repeat_r.content)
+# repeat_r = requests.post(url=configs.repeat_ip, json=[chachong_item_dict1])
+# print(repeat_r.content)
+import os
+print(os.environ.get('APPDATA'))

+ 1 - 1
structure/danti_structure.py

@@ -11,7 +11,7 @@ from utils.equation_extract import get_simpstr2eqn, get_equation_instr
 from utils.html_again_parse import css_label_wash
 from utils.washutil import base642img, css_conflict_deal, convert_huanhang
 from utils.field_eq2latex import latex_wash
-from dati2slave import get_slave
+from structure.dati2slave import get_slave
 
 
 def single_parse(one_item, item_type, wordid):

+ 3 - 3
structure/structure_main.py

@@ -203,7 +203,7 @@ if __name__ == '__main__':
         # print(load_dict)
 
     # path2 = r"F:\zwj\Text_Structure\accept_files\628c459781b582c0470d02d7.html"
-    path2 = r"C:\Users\Python\Desktop\62d5fce16c6aff2279346a7e.html"
+    path2 = r"C:\Users\Python\Desktop\62e0ac706c6aff2279346f3b.html"
     # path2 = r"F:\zwj\Text_Structure\new_tiku_structure_v3_sci\data\620bbf7aa7d375f4518b98e1.html"
     # path2 = r"F:\zwj\new_word_text_extract_v2\data\地理\2\2020-2021学年广东省揭阳市揭西县五校九年级(下)第二次联考地理试卷-普通用卷.html"
     # path2 = r"F:\zwj\new_word_parse_2021\data\huaxue\huexue2.html"
@@ -221,8 +221,8 @@ if __name__ == '__main__':
     # re_f = open(new_fpath, 'a+', encoding='utf-8')
     # for i in res1[0]["items"]:
     #     re_f.write(str(i))
-    # print(res1)
-    pprint(res1[0]['items'])
+    pprint(res1)
+    # pprint(res1[0]['items'])
     print('题目数量:', len(res1[0]["items"]))
 
     # new_fpath = r"F:\zwj\Text_Structure\new_tiku_structure_2021\res_folder\10-28.json"

+ 3 - 3
utils/html_again_parse.py

@@ -62,7 +62,8 @@ def css_label_wash(content):
         content = content.replace("</font >", "").replace("</font>", "")
         # content = content.replace("</span >", "").replace("</span>", "")
         content = content.replace('<p style="height: 0;">&nbsp;</p>', "\n").replace('<p><br/></p>', "\n")
-        content = content.replace("</p>", "</p>\n")  # 2022-4-25
+        # content = content.replace("</p>", "</p>\n")  # 2022-4-25
+        content = re.sub(r"</p>\s*(?!\n)", "</p>\n", content)
         content = re.sub(r"<br\s*/?>", "<p>", content)  # 2022/1/6
         # content = re.sub('<p( style=.*?")?>', "", content)
         # content = re.sub('<br\s*/?>', "\n", content)
@@ -130,7 +131,6 @@ def css_label_wash(content):
                     b_list = list(filter(filter_data, b_list))
                     b_list = list(map(lambda x: str(x), b_list))
                     a.extend(b_list)
-
                 elif str(line).startswith("<ul"):
                     a.append(line.text())
                 elif line.attr("class") == "slave-datas":
@@ -159,7 +159,7 @@ def css_label_wash(content):
             # a.append(str(html)) # 会自动带上</?p> ;&变为&amp;
             a.append(content.strip())
 
-        new_a = "\n".join(list(filter(lambda x: x.strip(), a)))
+        new_a = "\n".join(list(map(lambda x: str(x).strip(), a)))
         if subs2img:
             new_a = re.sub("|".join(subs2img.keys()), lambda x: subs2img[x.group()], new_a)
         new_a = "<p>" + new_a.replace("\n\n", "\n").replace("\n", "</p>\n<p>") + "</p>"

+ 21 - 7
utils/ruku_opera.py

@@ -405,6 +405,11 @@ class Ruku():
                     # 查重
                     if self.source != "xue_guan":
                         repeat_r, repeat_time = self.repeat_check(nn, one_items, repeat_time)
+                        if type(repeat_r) == str:
+                            res_xbk = {"items": [], "errcode": 1, "errmsg": repeat_r, "callback_type": 2}
+                            res_zyk = {"errcode": 1, "errmsgs": repeat_r, "data": {}}
+                            self.callback_user(res_xbk, self.callback_url)
+                            return res_zyk
                         new_one_item["repeat_res"] = repeat_r
                     new_one_item["topic_type_id"] = one_items["checkType"]["id"]
                     if "options_rank" in one_items and one_items["options_rank"]:
@@ -472,6 +477,11 @@ class Ruku():
                     # 查重
                     if self.source != "xue_guan":
                         repeat_r, repeat_time = self.repeat_check(nn, one_items, repeat_time)
+                        if type(repeat_r) == str:
+                            res_xbk = {"items": [], "errcode": 1, "errmsg": repeat_r, "callback_type": 2}
+                            res_zyk = {"errcode": 1, "errmsgs": repeat_r, "data": {}}
+                            self.callback_user(res_xbk, self.callback_url)
+                            return res_zyk
                         new_one_item["repeat_res"] = repeat_r
                     new_one_item["topic_type_id"] = one_items["checkType"]["id"]
                     if "options_rank" in one_items and one_items["options_rank"]:
@@ -687,15 +697,18 @@ class Ruku():
         if "options" in one_items:
             chachong_item_dict["options"] = one_items["options"]
 
-        # print("查重传参:", )
         # print(chachong_item_dict)
-        repeat_r = requests.post(url=configs.repeat_ip, json=[chachong_item_dict]).json()
+        try:
+            repeat_r = requests.post(url=configs.repeat_ip, json=[chachong_item_dict]).json()
 
-        print("查重结果:", repeat_r)  # [str(id + 1)]
-        if repeat_r:
-            repeat_r = repeat_r[str(id + 1)]
-        else:
-            repeat_r = []
+            print("查重结果:", repeat_r)  # [str(id + 1)]
+            if repeat_r:
+                repeat_r = repeat_r[str(id + 1)]
+            else:
+                repeat_r = []
+        except Exception as e:
+            logger.info("----【paper_id:{}】查重服务异常:{}".format(self.wordid, e))
+            repeat_r = "保存入库查重服务异常"
         repeat_time += time.time() - t22
         return repeat_r, repeat_time
 
@@ -718,6 +731,7 @@ class Ruku():
         try:
             r = requests.post(callback_url,
                               # json=res, # 可以,但是会进行转义
+                              headers={"Content-Type":"application/json"},
                               data=json.dumps(res_xbk, ensure_ascii=False).encode("utf-8"),  # 文件开头有编码显示
                               )
             print("------【paper_id:{}】,post 回调地址状态:{}===>回调结果: {} -------\n".format(self.wordid, r.status_code, r.text))