From 040824ff9f119e4c053a839063d4f95191d9a58d Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Sat, 21 Dec 2013 17:57:52 +0100 Subject: [PATCH] [Monsters] fix bug --- modules/monster/pages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/monster/pages.py b/modules/monster/pages.py index 8ef412c8..cf44f0fc 100644 --- a/modules/monster/pages.py +++ b/modules/monster/pages.py @@ -94,6 +94,9 @@ class AdvertPage(BasePage): if len(formation) != 0: advert.formation = u'%s' % formation[0].text - advert.experience = u'%s' % self.parser.select(jobsummary, 'dl/dd/span[@itemprop="qualifications"]', 1, method='xpath').text + experience = u'%s' % self.parser.select(jobsummary, 'dl/dd/span[@itemprop="qualifications"]', method='xpath') + if len(experience) != 0: + advert.experience = experience + advert.url = url return advert