2 Commits e4ef67d486 ... ff787263a2

Author SHA1 Message Date
  chencheng ff787263a2 modify check_table 1 year ago
  chencheng 6189d4a59b modify check_table 1 year ago
1 changed files with 14 additions and 13 deletions
  1. 14 13
      cores/check_table.py

+ 14 - 13
cores/check_table.py

@@ -10,19 +10,19 @@ class Table:
         self.total = 0
         self.empty = 0
 
-    def get_body(self):
-        print(self.html)
-        try:
-            res = self.html.split('<tbody>')[1]
-        except Exception as r:
-            print('<tbody> 识别失败')
-            print(r)
-        try:
-            res = res.split('</tbody>')[0]
-        except Exception as r:
-            print('</tbody> 识别失败')
-            print(r)
-        return res
+    # def get_body(self):
+    #     try:
+    #         res = self.html.split('<tbody>')[1]
+    #     except Exception as r:
+    #         print('<tbody> 识别失败')
+    #         print(r)
+    #     try:
+    #         res = res.split('</tbody>')[0]
+    #     except Exception as r:
+    #         print('</tbody> 识别失败')
+    #         print(r)
+    #     return res
+
 
     def get_tr(self):
         # str = self.get_body()
@@ -79,6 +79,7 @@ class Table:
     def check_html(self):
         self.get_empty()
         html_str = self.get_str()
+
         print(self.html)
         print(self.html_arr)
         print(self.empty)