fix crash on try to remove a missing element (closes #616)
This commit is contained in:
parent
11cd923e97
commit
65eb524991
1 changed files with 2 additions and 2 deletions
|
|
@ -27,8 +27,8 @@ class ArticlePage(GenericNewsPage):
|
|||
|
||||
def get_body(self):
|
||||
element_body = self.get_element_body()
|
||||
remove_from_selector_list(element_body, ["p.auteur", "h4", "h4"])
|
||||
try_remove_from_selector_list(element_body, ["p.tag", "div.alire", self.element_title_selector])
|
||||
remove_from_selector_list(element_body, ["p.auteur", "h4" ])
|
||||
try_remove_from_selector_list(element_body, ["p.tag", "div.alire", self.element_title_selector, "h4"])
|
||||
try_drop_tree(element_body, "script")
|
||||
|
||||
return self.browser.parser.tostring(element_body)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue