12345678910111213141516171819202122232425262728293031323334 |
- module.exports.house = function($) {
- var result = {
- images: $('.aspectRatioImage').map(function(){
- return { src : $(this).find('img').attr("src") };
- }).get(),
- name: $('#propertyName').text(),
- description: $('#descriptionSection>p').html(),
- lastUpdate : $('.freshnessUserActionsContainer .lastUpdated>span').text(),
- address: {
- street: $('.propertyAddressContainer h2>span:nth-child(1)').text(),
- city: $('.propertyAddressContainer h2>span:nth-child(2)').text(),
- zip: {
- state: $('.propertyAddressContainer .stateZipContainer>span:nth-child(1)').text(),
- code: $('.propertyAddressContainer .stateZipContainer>span:nth-child(2)').text(),
- }
- },
- rentInfo : $('#priceBedBathAreaInfoWrapper .column:eq(0)').find(".rentInfoDetail").html(),
- features: $('#priceBedBathAreaInfoWrapper .column:not(:first)').map(function () {
- return $(this).find('.rentInfoDetail').text();
- }).get(),
- contact: {
- phone: $('.contactInfo .phoneNumber span').html(),
- agentFullName: $('.agentFullName').text(),
-
- },
- };
- var data = JSON.parse(JSON.stringify(result)
- .split(' ').join('')
- .split(' ').join('')
- .split(' ').join('')
- .split(' ').join('')
- .split('\\n').join(''));
- return data;
- }
|