(self,
html_content:str,
sequence:str)
| 370 | return [] |
| 371 | |
| 372 | def extract_with_sequence(self, |
| 373 | html_content:str, |
| 374 | sequence:str): |
| 375 | if self.is_simplify: |
| 376 | html_content = simplify_html(html_content) |
| 377 | if sequence == []: |
| 378 | return [] |
| 379 | else: |
| 380 | tot_len = len(sequence) |
| 381 | for index, xpath in enumerate(sequence): |
| 382 | if index != tot_len - 1: |
| 383 | try: |
| 384 | html_content = find_common_ancestor(html_content, xpath) |
| 385 | except: |
| 386 | pass |
| 387 | else: |
| 388 | return self.extract_with_xpath(html_content, xpath) |
no test coverage detected