[Apec][Adecco]use html2text to fill description content
This commit is contained in:
parent
3023787214
commit
06310579d6
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue