diff --git a/modules/adecco/pages.py b/modules/adecco/pages.py index 9c7b1de2..c066cc80 100644 --- a/modules/adecco/pages.py +++ b/modules/adecco/pages.py @@ -19,6 +19,7 @@ from weboob.tools.browser import BasePage +from weboob.tools.misc import html2text from .job import AdeccoJobAdvert import datetime import re @@ -84,5 +85,6 @@ class AdvertPage(BasePage): advert.pay = u'%s' % spans[2].text advert.contract_type = u'%s' % spans[3].text advert.url = url - advert.description = self.document.getroot().xpath("//div[@class='descriptionContainer']/p")[0].text_content() + description = self.document.getroot().xpath("//div[@class='descriptionContainer']/p")[0] + advert.description = html2text(self.parser.tostring(description)) return advert diff --git a/modules/apec/pages.py b/modules/apec/pages.py index 95aa8d89..3a3db828 100644 --- a/modules/apec/pages.py +++ b/modules/apec/pages.py @@ -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