| 1234567891011121314151617181920212223242526272829303132 |
- module.exports.house = function($) {
- var result = {
- name: $('#propertyName').text(),
- description: $('#descriptionSection>p').html(),
- 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(),
- }
- },
- contact: {
- phone: $('.contactInfo .phoneNumber span').html(),
- //language: $('.contactInfo .languages span').html(),
- url: $('.contactInfo .mortar-wrapper a').attr('href'),
- // officeHours: $('.daysHoursContainer').map(function () {
- // return {
- // days: $(this).find('.days').text(),
- // hours: $(this).find('.hours').text(),
- // };
- // }).get()
- },
- };
- var data = JSON.parse(JSON.stringify(result)
- .split(' ').join('')
- .split(' ').join('')
- .split(' ').join('')
- .split(' ').join('')
- .split('\\n').join(''));
- return data;
- }
|