You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

condos.js 1.5KB

12345678910111213141516171819202122232425262728293031323334
  1. module.exports.condo = function($) {
  2. var result = {
  3. images: $('.aspectRatioImage').map(function(){
  4. return { src : $(this).find('img').attr("src") };
  5. }).get(),
  6. name: $('#propertyName').text(),
  7. description: $('#descriptionSection>p').html(),
  8. lastUpdate : $('.freshnessUserActionsContainer .lastUpdated>span').text(),
  9. address: {
  10. street: $('.propertyAddressContainer h2>span:nth-child(1)').text(),
  11. city: $('.propertyAddressContainer h2>span:nth-child(2)').text(),
  12. zip: {
  13. state: $('.propertyAddressContainer .stateZipContainer>span:nth-child(1)').text(),
  14. code: $('.propertyAddressContainer .stateZipContainer>span:nth-child(2)').text(),
  15. }
  16. },
  17. rentInfo : $('#priceBedBathAreaInfoWrapper .column:eq(0)').find(".rentInfoDetail").html(),
  18. features: $('#priceBedBathAreaInfoWrapper .column:not(:first)').map(function () {
  19. return $(this).find('.rentInfoDetail').text();
  20. }).get(),
  21. contact: {
  22. phone: $('.contactInfo .phoneNumber span').html(),
  23. agentFullName: $('.agentFullName').text(),
  24. },
  25. };
  26. var data = JSON.parse(JSON.stringify(result)
  27. .split(' ').join('')
  28. .split(' ').join('')
  29. .split(' ').join('')
  30. .split(' ').join('')
  31. .split('\\n').join(''));
  32. return data;
  33. }