L
likhon
I wrote the below code using scrubyt gem. but it return null value.
But when I run this code using firefox agent it return perfect
results. I do not want to open any agent. Could anyone tell me whats
wrong with the following code.
--------------------------------------------------------
def self.get_data_from_half_ebay(isbn)
half_ebay_data = Scrubyt::Extractor.define do
fetch "http://search.half.ebay.com/#{isbn}"
henewbooks "//html/body/table[2]/tbody/tr/td/table[4]/tbody/tr/td
[2]/table/tbody/tr/td/table[2]/tbody" do
henb "//tr[@class = 'tr-border']" do
henbprice "//span[@class = 'ItemPrice']"
henbbuylink "//a[@class = MoreInfo]/@href"
end
end
end
@description = half_ebay_data.to_xml
return @description
end
But when I run this code using firefox agent it return perfect
results. I do not want to open any agent. Could anyone tell me whats
wrong with the following code.
--------------------------------------------------------
def self.get_data_from_half_ebay(isbn)
half_ebay_data = Scrubyt::Extractor.define do
fetch "http://search.half.ebay.com/#{isbn}"
henewbooks "//html/body/table[2]/tbody/tr/td/table[4]/tbody/tr/td
[2]/table/tbody/tr/td/table[2]/tbody" do
henb "//tr[@class = 'tr-border']" do
henbprice "//span[@class = 'ItemPrice']"
henbbuylink "//a[@class = MoreInfo]/@href"
end
end
end
@description = half_ebay_data.to_xml
return @description
end