uniform minutes20 and inrocks
This commit is contained in:
parent
b584740fc8
commit
2ebe8012bd
10 changed files with 76 additions and 97 deletions
|
|
@ -1,3 +1,4 @@
|
|||
"ArticlePage object for inrocks"
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2011 Julien Hebert
|
||||
|
|
@ -15,7 +16,6 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
from weboob.tools.parsers.lxmlparser import select, SelectElementException
|
||||
from .inrocks import InrocksPage
|
||||
|
||||
|
|
@ -26,8 +26,8 @@ def try_remove(base_element, selector):
|
|||
pass
|
||||
|
||||
class ArticlePage(InrocksPage):
|
||||
def set_body(self):
|
||||
self.element_body = select(self.main_div, "div.maincol", 1)
|
||||
"ArticlePage object for inrocks"
|
||||
def get_body(self):
|
||||
try_remove(self.element_body, "div.sidebar")
|
||||
details = select(self.element_body, "div.details", 1)
|
||||
try_remove(details, "div.footer")
|
||||
|
|
@ -35,5 +35,8 @@ class ArticlePage(InrocksPage):
|
|||
for selector in ["h1", "div.picture", "div.date", "div.news-single-img",
|
||||
"div.metas_img", "strong"]:
|
||||
try_remove(header, selector)
|
||||
|
||||
return self.browser.parser.tostring(self.element_body)
|
||||
|
||||
|
||||
|
||||
self.article.body = self.browser.parser.tostring(self.element_body)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue