new branch inrocks
This commit is contained in:
parent
9dad89bf7f
commit
3ea6b143b8
9 changed files with 103 additions and 71 deletions
|
|
@ -17,7 +17,7 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
from weboob.tools.parsers.lxmlparser import select, SelectElementException
|
||||
from .minutes20 import Minutes20Page, NoAuthorElement
|
||||
from .genericArticle import GenericNewsPage, NoAuthorElement
|
||||
|
||||
def try_remove(base_element, selector):
|
||||
try :
|
||||
|
|
@ -25,8 +25,13 @@ def try_remove(base_element, selector):
|
|||
except (SelectElementException, ValueError):
|
||||
pass
|
||||
|
||||
class ArticlePage(Minutes20Page):
|
||||
class ArticlePage(GenericNewsPage):
|
||||
"ArticlePage object for minutes20"
|
||||
def on_loaded(self):
|
||||
self.main_div = self.document.getroot()
|
||||
self.element_author_selector = "div.mna-signature"
|
||||
self.element_body_selector = "div.mna-body"
|
||||
|
||||
def get_body(self):
|
||||
element_body = self.get_element_body()
|
||||
try_remove(element_body, "div.mna-tools")
|
||||
|
|
@ -36,3 +41,5 @@ class ArticlePage(Minutes20Page):
|
|||
except NoAuthorElement:
|
||||
pass
|
||||
return self.browser.parser.tostring(element_body)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue