def parse_property_page(self, response): l = BristolPropertyCentrePropertyLoader(item=PropertyItem(), response=response) l.add_css('area', "#propertyContent h1::text") l.add_css('street_name', "#propertyContent h1::text") #l.add_css('postcode', '.detailHeader > h2::text') l.add_css('price_per_month', ".propertyPrice h2::text") l.add_value('agent', 'Bristol Property Centre') l.add_css('number_bedrooms', ".roomIcons .roombeds::text") l.add_css('number_bathrooms', ".roomIcons .roombaths::text") l.add_css('description', "#propertyDescription p ::text") l.add_css('description', "#keyFeatures ul li ::text") l.add_css('amenities', "#propertyDescription p ::text") l.add_css('amenities', "#keyFeatures ul li ::text") l.add_css('heating_type', "#propertyDescription p ::text") l.add_css('heating_type', "#keyFeatures ul li ::text") #l.add_css('epc_rating', "section.singProp.content p::text") l.add_css('let_agreed', ".propertyPrice h2::text") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("meta[property='og:image']::attr('content')"). extract()[0])) return l.load_item()
def parse_property_page(self, response): l = UbuLettingsPropertyLoader(item=PropertyItem(), response=response) l.add_css('area', '#propAddress::text') l.add_css('street_name', '#propAddress::text') #l.add_css('postcode', '.detailHeader > h2::text') l.add_css('price_per_month', '#propPrice::text') l.add_value('agent', 'UBU Lettings') l.add_value('number_bedrooms', 5) # TODO: bathrooms l.add_xpath('description', "//div[@id='propDetShortDescCont1']//text()") l.add_xpath('description', "//ul[@id='propDetStarItemsCont1']//li//text()") l.add_xpath('amenities', "//div[@id='propDetShortDescCont1']//text()") l.add_xpath('amenities', "//ul[@id='propDetStarItemsCont1']//li//text()") l.add_xpath('heating_type', "//div[@id='propDetShortDescCont1']//text()") l.add_xpath('heating_type', "//ul[@id='propDetStarItemsCont1']//li//text()") l.add_xpath('epc_rating', "//ul[@id='propDetStarItemsCont1']//li//text()") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("#mainImage::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): l = LetWithEasePropertyLoader(item=PropertyItem(), response=response) l.add_css('area', '.address::text') l.add_css('street_name', '.address::text') l.add_css('postcode', '.address::text') l.add_css('price_per_month', '.price::text') l.add_value('agent', 'Let With Ease') l.add_css('number_bedrooms', ".beds::text") # TODO: bathrooms l.add_css('description', "div.features ul li::text") l.add_css('description', "div.description ::text") l.add_css('amenities', "div.features ul li::text") l.add_css('amenities', "div.description ::text") l.add_css('heating_type', "div.features ul li::text") l.add_css('heating_type', "div.description ::text") #l.add_xpath('epc_rating', "//ul[@id='propDetStarItemsCont1']//li//text()") l.add_css('let_agreed', "div.status::text") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("#largePhoto::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): l = ChappellAndMatthewsPropertyLoader(item=PropertyItem(), response=response) l.add_xpath('area', "//div[@id='DetailsPriceAndContactContainer']//h1/text()") l.add_xpath('street_name', "//h2[@class='DescriptionAddress']/text()") l.add_xpath('postcode', "//h2[@class='DescriptionAddress']/text()") l.add_xpath('price_per_month', "//label[@class='generic-price']/text()") l.add_value('agent', 'Chappell And Matthews') l.add_xpath('number_bedrooms', "//li[@class='Bedrooms']//h2/text()") # TODO: bathrooms, epc rating l.add_xpath('description', "//div[@id='DetailsContentContainer']//text()") l.add_xpath('amenities', "//div[@id='DetailsContentContainer']//text()") l.add_xpath('heating_type', "//div[@id='DetailsContentContainer']//text()") l.add_xpath( 'let_agreed', "//div[@id='GlobalPropertyDetails']//div[@class='LetAgreed']/text()" ) l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.xpath("//img[@id='imgMainPhoto']/@src").extract()[0])) yield l.load_item()
def parse_property_page(self, response): l = AbodePropertyLoader(item=PropertyItem(), response=response, number_bedrooms=5) l.add_css('area', '.detailHeader > h2::text') l.add_css('street_name', '.detailHeader > h2::text') l.add_css('postcode', '.detailHeader > h2::text') l.add_css('price_per_month', '.detailHeader > h2 > strong::text') l.add_value('agent', 'Abode') l.add_value('number_bedrooms', 5) # TODO: bathrooms l.add_xpath('description', "//div[@id='description']/div[@class='inner']//text()") l.add_xpath('amenities', "//div[@id='description']/div[@class='inner']//text()") l.add_xpath('amenities', "//div[@class='features']//li//text()") l.add_xpath('heating_type', "//div[@id='description']/div[@class='inner']//text()") l.add_xpath('heating_type', "//div[@class='features']//li//text()") l.add_xpath('epc_rating', "//div[@class='features']//li//text()") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("#mainImg > img::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): number_bedrooms = to_number_bedrooms( response.css("li.beds span::text").extract()[0]) l = PurpleFrogPropertyLoader(item=PropertyItem(), response=response, number_bedrooms=number_bedrooms) l.add_css('area', "h1.property-title::text") l.add_css('street_name', "h1.property-title::text") l.add_css('postcode', "h1.property-title::text") l.add_css('price_per_month', "div.prices span.price::text") l.add_value('agent', 'Purple Frog') l.add_css('number_bedrooms', "li.beds span::text") #l.add_css('number_bathrooms', "ul.icons li.baths span::text") l.add_css('description', "div#description div.left-content-panel p::text") l.add_css('amenities', "div#description div.left-content-panel p::text") l.add_css('amenities', "div.features i::text") l.add_css('heating_type', "div#description div.left-content-panel p::text") l.add_css('heating_type', "div.features i::text") l.add_css('epc_rating', ".indicators .indicator.ind-current span::text") #l.add_css('let_agreed', "span.soldbar::text") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css(".main-img img::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): l = TheLettingGamePropertyLoader(item=PropertyItem(), response=response) l.add_xpath( 'area', "//div[@id='propertyAddress']//span[@itemprop='name']/text()") l.add_xpath( 'street_name', "//div[@id='propertyAddress']//span[@itemprop='name']/text()") l.add_xpath( 'postcode', "//div[@id='propertyAddress']//span[@itemprop='name']/text()") l.add_xpath( 'price_per_month', "//div[@id='propertyAddress']//span[@itemprop='price']/text()") l.add_value('agent', 'The Letting Game') l.add_css('number_bedrooms', "li.bedrooms::text") # TODO: bathrooms, epc l.add_xpath('description', "//p[@itemprop='description']//text()") l.add_xpath('amenities', "//p[@itemprop='description']//text()") l.add_xpath('amenities', "//ul[@class='result-bullets']//li//text()") l.add_xpath('heating_type', "//p[@itemprop='description']//text()") l.add_xpath('heating_type', "//ul[@class='result-bullets']//li//text()") #l.add_xpath('epc_rating', "//ul[@id='propDetStarItemsCont1']//li//text()") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css(".carousel-inner img::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): l = PropertyConceptPropertyLoader(item=PropertyItem(), response=response) l.add_css('area', "div.introBox h1::text") l.add_css('street_name', "div.introBox h1::text") #l.add_css('postcode', '.detailHeader > h2::text') l.add_css('price_per_month', "div.introBox p.pPrice::text") l.add_value('agent', 'Property Concept') l.add_css('number_bedrooms', "ul.icons li.beds span::text") l.add_css('number_bathrooms', "ul.icons li.baths span::text") l.add_css('description', "section.singProp.content p::text") l.add_css('description', "div.left ul li::text") l.add_css('amenities', "section.singProp.content p::text") l.add_css('amenities', "div.left ul li::text") l.add_css('heating_type', "section.singProp.content p::text") l.add_css('heating_type', "div.left ul li::text") l.add_css('epc_rating', "section.singProp.content p::text") l.add_css('let_agreed', "span.soldbar::text") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("#slider img::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): l = OceanPropertyLoader(item=PropertyItem(), response=response) l.add_xpath( 'area', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_lblFormattedAddress']/text()" ) l.add_xpath( 'street_name', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_lblFormattedAddress']/text()" ) # l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath( 'price_per_month', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_lblFormattedPrice']/text()" ) l.add_value('agent', 'Ocean') l.add_xpath( 'number_bedrooms', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_lblBedrooms']/text()" ) # TODO: bathrooms l.add_xpath( 'description', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_xpath( 'amenities', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_xpath( 'heating_type', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_xpath( 'epc_rating', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.xpath( "//img[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlGallery_cntrlPhotos_ctl00_imgPhoto']/@src" ).extract()[0])) return l.load_item()
def parse_property_page(self, response): l = AbsolutePropertyLoader(item=PropertyItem(), response=response) l.add_css('area', '.property-area::text') l.add_css('street_name', 'h3.property-address::text') l.add_css('postcode', 'h3.property-address::text') l.add_css('price_per_month', '.property-price::text') l.add_value('agent', 'Absolute Property') l.add_css('number_bedrooms', '.property-bedrooms::text') l.add_css('let_agreed', '.property-status::text') l.add_css('description', '.property-description') l.add_css('amenities', '.property-description') l.add_css('heating_type', '.property-description') # TODO: bathrooms, epc rating l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("img.attachment-full::attr('src')").extract()[0])) return l.load_item()
def parse_property_list(self, response): for property in response.xpath("//table[@width='96%']"): l = TerryOlpinPropertyLoader(item=PropertyItem(), selector=property) l.add_xpath('area', ".//td[@width='31%']/text()") #l.add_css('street_name', '.detailHeader > h2::text') #l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath('price_per_month', ".//td[@width='20%']/text()") l.add_value('agent', 'Terry Olpin') l.add_xpath('number_bedrooms', ".//td[@width='17%']/text()") # TODO: bathrooms l.add_xpath('description', ".//p//text()") l.add_xpath('amenities', ".//p//text()") l.add_xpath('heating_type', ".//p//text()") l.add_xpath('epc_rating', ".//p//text()") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin(property.xpath(".//img/@src").extract()[0])) yield l.load_item()
def parse_property_page(self, response): l = CliftonPropertyServicesPropertyLoader(item=PropertyItem(), response=response) l.add_xpath('area', "//h3[@class='fulladdress']/text()") l.add_xpath('street_name', "//h3[@class='fulladdress']/text()") # l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath('price_per_month', "//h2[@class='dtaddress']/em/text()") l.add_value('agent', 'Clifton Property Services') l.add_xpath('number_bedrooms', "//span[@class='rs-bedrooms']/text()") # TODO: bathrooms l.add_xpath('description', "//div[@id='s-dtintrodesc']//text()") l.add_xpath('description', "//ul[@id='s-dtbullets']//text()") l.add_xpath('amenities', "//div[@id='s-dtintrodesc']//text()") l.add_xpath('amenities', "//ul[@id='s-dtbullets']//text()") l.add_xpath('heating_type', "//div[@id='s-dtintrodesc']//text()") l.add_xpath('heating_type', "//ul[@id='s-dtbullets']//text()") #l.add_xpath('epc_rating',"//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()") l.add_xpath('let_agreed', "h2[@class='dtaddress']/em/span[@class='PropStatus']/text()") l.add_value('url', response.url) l.add_value('image_url', response.urljoin(response.xpath("//img[@id='mainimage']/@src").extract()[0])) return l.load_item()
def parse(self, response): for property in response.xpath("//div[@id='content']//div[@class='lightboxGallery']"): l = CityPropertyLetsPropertyLoader(item=PropertyItem(), selector=property, number_bedrooms=CityPropertyLetsNumberBedroomsProcessor()(property.xpath(".//ul/li[3]/text()").extract()[0])) l.add_xpath('area', ".//h1/text()") l.add_xpath('street_name', ".//h1/text()") # l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath('price_per_month', ".//li/b/text()") l.add_value('agent', 'City Property Lets') l.add_xpath('number_bedrooms', ".//ul/li[3]/text()") # TODO: bathrooms l.add_xpath('description', ".//p//text()") l.add_xpath('amenities', ".//p//text()") l.add_xpath('amenities', ".//ul//li//text()") l.add_xpath('heating_type', ".//p//text()") l.add_xpath('heating_type', ".//ul//li//text()") # l.add_xpath('epc_rating', ".//p//text()") l.add_value('url', response.url) l.add_value('image_url', response.urljoin(property.xpath(".//img/@src").extract()[0])) yield l.load_item()
def parse_property_page(self, response): l = JacksonPropertyPropertyLoader(item=PropertyItem(), response=response, number_bedrooms=to_number_bedrooms( response.xpath("//div[@class='searchHeaderRight']/text()").extract()[ 0])) # l.add_xpath('area', "//div[@class='searchHeaderLeft']/text()") l.add_xpath('street_name', "//div[@class='searchHeaderLeft']/text()") # l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath('price_per_month', "//div[@class='searchHeaderRight']/text()") l.add_value('agent', 'Jackson Property') l.add_xpath('number_bedrooms', "//div[@class='searchHeaderRight']/text()") # TODO: bathrooms l.add_xpath('description', "//div[@class='propertyDetailInfo']//p//text()") l.add_xpath('amenities', "//div[@class='propertyDetailInfo']//p//text()") l.add_xpath('heating_type', "//div[@class='propertyDetailInfo']//p//text()") l.add_xpath('epc_rating', "//div[@class='propertyDetailInfo']//p//text()") l.add_value('url', response.url) maybe_image = response.xpath("//div[@class='preview']//img/@src").extract() l.add_value('image_url', response.urljoin(maybe_image[0]) if maybe_image else "") return l.load_item()
def parse_property_page(self, response): l = AccommodationUnlimitedPropertyLoader(item=PropertyItem(), response=response) l.add_xpath('area', "//div[@class='row property-detail']//p//text()[5]") l.add_xpath('street_name', "//div[@class='row property-detail']//p//text()[5]") #l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath('price_per_month', "//div[@class='row property-detail']//p//text()[1]") l.add_value('agent', 'Accommodation Unlimited') l.add_xpath('number_bedrooms', "//div[@class='row property-detail']//p//text()[2]") #l.add_css('number_bathrooms', ".roomIcons .roombaths::text") l.add_xpath('description', "//div[@class='row property-detail']//p//text()") l.add_xpath('amenities', "//div[@class='row property-detail']//p//text()") l.add_xpath('heating_type', "//div[@class='row property-detail']//p//text()") #l.add_css('epc_rating', "section.singProp.content p::text") #l.add_css('let_agreed', ".propertyPrice h2::text") l.add_value('url', response.url) maybe_image = response.css("div.large-6.columns.text-center img::attr('src')").extract() if maybe_image: l.add_value('image_url', response.urljoin(maybe_image[0])) return l.load_item()
def parse_property_page(self, response): l = BerkeleyEstatesPropertyLoader( item=PropertyItem(), response=response, number_bedrooms=to_number_bedrooms( response.xpath( "//table[@class='bannertable']//tr[1]//td[2]//b/text()"). extract()[0])) l.add_css('area', '.bannertable > tr:first-child > td:first-child b::text') l.add_css('street_name', '.bannertable > tr:first-child > td:first-child b::text') #l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath('price_per_month', u"//b[contains(text(), '£')]//text()") l.add_value('agent', 'Berkeley Estates') l.add_xpath('number_bedrooms', "//table[@class='bannertable']//tr[1]//td[2]//b/text()") l.add_xpath('number_bathrooms', "//table[@class='bannertable']//tr[1]//td[2]//b/text()") # TODO: bathrooms, epc l.add_xpath('description', "//td[.//*[contains(text(),'Full Description')]]//text()") l.add_xpath('description', "//ul//text()") l.add_xpath('amenities', "//td[.//*[contains(text(),'Full Description')]]//text()") l.add_xpath('amenities', "//ul//text()") l.add_xpath('heating_type', "//td[.//*[contains(text(),'Full Description')]]//text()") l.add_xpath('heating_type', "//ul//text()") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css(".image img::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): l = SureMovePropertyLoader(item=PropertyItem(), response=response) l.add_css('area', "p.address::text") l.add_css('street_name', "p.address::text") #l.add_css('postcode', '.detailHeader > h2::text') l.add_css('price_per_month', "span.property-price::text") l.add_value('agent', 'Sure Move') l.add_css('number_bedrooms', "ul.guide li.beds::text") l.add_css('number_bathrooms', "ul.guide li.bath::text") l.add_css('description', ".property-description p ::text") l.add_css('amenities', ".property-description p ::text") l.add_css('heating_type', ".property-description p ::text") #l.add_css('epc_rating', "section.singProp.content p::text") l.add_css('let_agreed', "div.banner-agreed p::text") l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.css("img.main-prop-image::attr('src')").extract()[0])) return l.load_item()
def parse_property_page(self, response): number_bedrooms = int( response.xpath( "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblBedrooms']/text()" ).extract()[0]) l = CliftonsPropertyLoader(item=PropertyItem(), response=response, number_bedrooms=number_bedrooms) l.add_xpath( 'area', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblFormattedAddress']/text()" ) l.add_xpath( 'street_name', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblFormattedAddress']/text()" ) # l.add_css('postcode', '.detailHeader > h2::text') l.add_xpath( 'price_per_month', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblFormattedPrice']/text()" ) l.add_value('agent', 'Cliftons') l.add_xpath( 'number_bedrooms', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblBedrooms']/text()" ) l.add_xpath( 'number_bedrooms', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblBathrooms']/text()" ) # TODO: bathrooms l.add_xpath( 'description', "//table[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_cntrlBulletedList']//li//text()" ) l.add_xpath( 'description', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblBriefDescription']//text()" ) l.add_xpath( 'description', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_xpath( 'amenities', "//table[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_cntrlBulletedList']//li//text()" ) l.add_xpath( 'amenities', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblBriefDescription']//text()" ) l.add_xpath( 'amenities', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_xpath( 'heating_type', "//table[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_cntrlBulletedList']//li//text()" ) l.add_xpath( 'heating_type', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_lblBriefDescription']//text()" ) l.add_xpath( 'heating_type', "//div[@id='ctl00_cntrlCenterRegion_cntrlProperties_ctl00_ctl00_cntrlFullDescription']//text()" ) l.add_xpath( 'epc_rating', "//table[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_cntrlBulletedList']//li//text()" ) l.add_xpath( 'let_agreed', "//span[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_cntrlStatus_lblStatus']/text()" ) l.add_value('url', response.url) l.add_value( 'image_url', response.urljoin( response.xpath( "//img[@id='ctl00_cntrlCenterRegion_cntrlProperties_item_0_ctl00_cntrlGallery_cntrlMainPhoto_ctl00_cntrlAsset']/@src" ).extract()[0])) return l.load_item()