This is the page in question: http://phoenix.craigslist.org/cpg/
What I would like to do is create an array that looks like this:
Date (as shown by the h4 tag on this page) => in the cell [0][0][0],
Link text => in the cell [0][1][0]
Link href => in the cell[0][1][1]
i.e. in each row, I store each of these elements in a row.
What I did was just pull out all the tags h4and save them in a hash, for example:
contents2[link[:date]] = content_page.css("h4").text
The problem is that one cell saves all the text from h4 tags on the whole page ... whereas I would like to have 1 date in 1 cell.
So, as an example:
0 => Mon May 28 - Leads need follow up - (Phoenix) - http://phoenix.craigslist.org/wvl/cpg/3043296202.html
1=> Mon May 28 - .Net/Java Developers - (phoenix) - http://phoenix.craigslist.org/cph/cpg/3043067349.html
Any thoughts on how I could approach this with the code would be greatly appreciated.