Created
October 30, 2016 12:09
-
-
Save refo/b68db1994e4bbc4c5d2abb4dc5cb2e63 to your computer and use it in GitHub Desktop.
Namecheap scrape domain list and expiration dates
This file contains 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
// #maincontent > div > div.dl-wrapper.normal-view > div > div:nth-child(2) > div > table > tbody:nth-child(3) > tr:nth-child(1) > td.domain-name.form > p:nth-child(2) > strong | |
// #maincontent > div > div.dl-wrapper.normal-view > div > div:nth-child(2) > div > table > tbody:nth-child(3) > tr:nth-child(1) > td.expiring > p > b | |
var list = $('#maincontent > div > div.dl-wrapper.normal-view > div > div:nth-child(2) > div > table tr.item') | |
.map(function(idx, item){ | |
return { | |
'domain': $('td.domain-name.form > p:nth-child(2) > strong', item).text(), | |
'expiring': $('td.expiring > p > b', item).text() | |
}; | |
}).toArray(); | |
copy(list); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment