diff --git a/weboob/applications/flatboob/flatboob.py b/weboob/applications/flatboob/flatboob.py index 5d7c28d0..0d0391ba 100644 --- a/weboob/applications/flatboob/flatboob.py +++ b/weboob/applications/flatboob/flatboob.py @@ -34,6 +34,10 @@ class HousingFormatter(IFormatter): def format_obj(self, obj, alias): result = u'%s%s%s\n' % (self.BOLD, obj.title, self.NC) result += 'ID: %s\n' % obj.fullid + + if hasattr(obj, 'url') and obj.url: + result += 'URL: %s\n' % obj.url + result += 'Cost: %s%s\n' % (obj.cost, obj.currency) result += u'Area: %sm²\n' % (obj.area) if obj.date: @@ -56,6 +60,7 @@ class HousingFormatter(IFormatter): result += '\n\n%sDetails%s\n' % (self.BOLD, self.NC) for key, value in obj.details.iteritems(): result += ' %s: %s\n' % (key, value) + return result diff --git a/weboob/capabilities/housing.py b/weboob/capabilities/housing.py index 8ab981e0..52bea947 100644 --- a/weboob/capabilities/housing.py +++ b/weboob/capabilities/housing.py @@ -61,7 +61,7 @@ class Housing(BaseObject): phone = StringField('Phone number to contact') photos = Field('List of photos', list) details = Field('Key/values of details', dict) - + url = StringField('Url of the the advert') class Query(BaseObject): """