Created
June 11, 2014 08:36
-
-
Save Pezmc/146ea12c4664671b4b3d to your computer and use it in GitHub Desktop.
Rightmove and Zoopla information grabbing bookmarklet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var string = ''; | |
if(location.host == 'www.zoopla.co.uk') { | |
string += $('#listing-details h1').text().replace('to rent', '') + "\t"; | |
string += $('.listing-details-address h2').text().split(',')[0] + "\t"; | |
string += $('.listing-details-price.text-price').text().match(/\d+/gi)[0] + "\t"; | |
string += $('.sidebar strong a[href^="/find-agents/"]').text() + "\t"; | |
} | |
if(location.host == 'www.rightmove.co.uk') { | |
string += $('.property-header-bedroom-and-price h1').text().replace('to rent', '') + "\t"; | |
string += $('.property-header-bedroom-and-price address').text().split(',')[0] + "\t"; | |
string += $('#propertyHeaderPrice strong').text().match(/[\d,]+/gi)[1] + "\t"; | |
string += $('#secondaryAgentDetails .agent-details-display a strong').text() + "\t"; | |
} | |
if(string != '') { | |
string += new Date().toJSON().slice(0,10) + "\t"; | |
string += location.href; | |
window.prompt('Copy and paste', string); | |
} else | |
alert('Unable to read website'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment