[Apec][Adecco]use html2text to fill description content

This commit is contained in:
Bezleputh 2013-12-13 12:27:36 +01:00
commit 06310579d6
2 changed files with 6 additions and 2 deletions

View file

@ -19,6 +19,7 @@
from weboob.tools.browser import BasePage
from weboob.tools.misc import html2text
import dateutil.parser
import re
@ -52,7 +53,8 @@ class AdvertPage(BasePage):
advert = ApecJobAdvert(_id)
advert.title = re_id_title.search(url).group(2).replace('-', ' ')
advert.description = self.document.getroot().xpath("//div[@class='contentWithDashedBorderTop marginTop boxContent']/div")[0].text_content()
description = self.document.getroot().xpath("//div[@class='contentWithDashedBorderTop marginTop boxContent']/div")[0]
advert.description = html2text(self.parser.tostring(description))
advert.job_name = advert.title