Skip to content

Instantly share code, notes, and snippets.

@codewizard13
Last active May 9, 2016 16:23
Show Gist options
  • Save codewizard13/d742f43dc32fda60a7ab6a78585ed1ba to your computer and use it in GitHub Desktop.
Save codewizard13/d742f43dc32fda60a7ab6a78585ed1ba to your computer and use it in GitHub Desktop.
2016-05-09 - Builds a CSV from the Medical Medium's list of Recommended Supplements
$('div.amaprod').each( function(i) {
var rowArray = [];
var title = $(this).find('div.ttl')[0].innerHTML;
//console.log('Title ' + i + ': ' + title);
var frameSrc = $(this).find('iframe')[0].src;
rowArray = [i,title,frameSrc];
var outText = rowArray.join("|");
console.log(outText);
});
/*
Uses this link:
http://www.medicalmedium.com/preferred/supplements
NOTE: This self-project taught me a little about cross browser origin errors and that it is not easy to get information from an iframe if you are not the owner of the site the iframe is coming from.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment