|
@@ -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)
|