Skip to content

Instantly share code, notes, and snippets.

@zaki
Created April 26, 2012 06:31
Show Gist options
  • Save zaki/2496713 to your computer and use it in GitHub Desktop.
Save zaki/2496713 to your computer and use it in GitHub Desktop.
Metro Scraping Memo
$("#timeTable > table > tbody > tr").each(function() { var hour = ($(".hour", this).text()); var times = []; $(".timeData", this).each(function() { times.push($(".info01", this).text().replace(/\s+/g, '')+" "+$(".info02", this).text().replace(/\s+/g, '')+" "+$(this).attr('class').replace(/timeData|dir|\s+/g, '')); }); console.log(hour, times)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment