J
Junkone
url="http://www.nasdaq.com/aspxcontent/shortinterests.aspx?
symbol=FRE&selected=FRE"
doc=open(url) {|f| Hpricot(f)}
doc.search("//table[@class='dataGrid']")
rqTable=doc.search("//table[@class='dataGrid']")
rqTable.search('tr').each{|tr|
tdArray=tr.search('td')
dataArray=Array.new
#tr.search('td').each{|td|
# puts td.inner_text
# }
puts tdArray[0].class,tdArray[1].to_s,tdArray[2]
puts "end"
}
how do i get the text value of the tdArray[0] which is internally a
Hpricot::Elem
symbol=FRE&selected=FRE"
doc=open(url) {|f| Hpricot(f)}
doc.search("//table[@class='dataGrid']")
rqTable=doc.search("//table[@class='dataGrid']")
rqTable.search('tr').each{|tr|
tdArray=tr.search('td')
dataArray=Array.new
#tr.search('td').each{|td|
# puts td.inner_text
# }
puts tdArray[0].class,tdArray[1].to_s,tdArray[2]
puts "end"
}
how do i get the text value of the tdArray[0] which is internally a
Hpricot::Elem