[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
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