Skip to content

Instantly share code, notes, and snippets.

@mdarens
Created June 29, 2014 00:46
Show Gist options
  • Save mdarens/66eb25be26e362df58ba to your computer and use it in GitHub Desktop.
Save mdarens/66eb25be26e362df58ba to your computer and use it in GitHub Desktop.
Scrape the amino acid profile from a page on nutritiondata.self.com
var selectors = [];
for (var i = 77; i <= 96; i+=1) {
selectors.push('#NUTRIENT_'+i);
}
var proteinAmounts = [];
$.each(selectors, function(idx, sel) {
proteinAmounts.push($(sel).text());
});
proteinAmounts;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment