Hello Rails community,
Watching Railscasts and other forums I've figured out how to scrape sites like grabbing retail prices or text, using nokogiri and mechanize gems . What is not clear to me his how to grab elements from a format like an external CSV file. For example I have a utility sensor that records kilowatt hour usage as CSV but no headers are included, only the data in KWH, hours, date etc with commas as delimiters. I'd like to scrape the csv, save it and use the data to create a graph or chart. I've tried import.io
but it does not recognize the file format. I think nokogiri and mechanize require specific css selectors which the file does not have. The file is not on the main page but can be accessed via a dropdown list that you click which takes you to the file. So far I've only tried to scrape directly from the file specific url ( import.io
, nokogiri) but maybe I have to crawl through the dropdown first? I don't know enough Rails to know whats best approach. Thank you for your help!