Last active
May 9, 2016 16:23
-
-
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
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
$('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