Export DNS records from bluehost.com with jQuery
Published 2015-2-13I don't know whether or not BlueHost has an easy-to-access API, but the HTML is decently well structured enough that I could get my data after about 10 minutes of sprinkling of jQuery in the console:
var things = [];
$('.rec_body').each(function (i, table) {
var headers = [];
$(table).find('.brand-table.rec_table.gridtable tr').each(function (j, tr) {
if (0 === j) {
$(tr).find('th').each(function (k, th) {
headers[k] = ($(th).text()||'').toLowerCase();
});
return;
}
var thing = {};
$(tr).find('td').each(function (k, td) {
thing[headers[k]] = ($(td).text()||'').toLowerCase();
});
things.push(thing);
});
});
console.log(JSON.stringify(things, null, ' '));
Here's what you do
You sign in to BlueHost and go to your domain management page
TODO: needs example link
Then open the Chrome JavaScript Console
(Menu Button) => More tools => JavaScript Console
Then paste the entirely of the script above and hit enter.
Viola, your DNS records as JSON!
By AJ ONeal
Thanks!
It's really motivating to know that people like you are benefiting
from what I'm doing and want more of it. :)
Did I make your day?
Buy me a coffee
(you can learn about the bigger picture I'm working towards on my patreon page )