To Do:
- DONE - Add venue functionality - coded but needs to be checked
- DONE - Add sponsor functionality
- DONE - "More info" functionality - coded but needs to be checked
- DONE - Update CLI to work with 'More Info' functionality
- DONE (for now) - Refactor CLI
- DONE - Work on UI of CLI
- DONE - REFACTOR EVENTS! create hash for scrape selectors? - Done except for list_events method
- DONE - Create README
- Release gem (http://guides.rubygems.org/publishing/) - can't get this to work; keep getting access denied
- DONE - Add explanations for each item in spec.md
- DONE - Create video demo
- DONE - Finish blog post
- DONE - Refactor to include Scraper class
- DONE - Refactor to scrape categories
- DONE - Add "retrieving events" message while scrape is happening
- DONE - Make doc a class variable
- DONE - Merge scrape_categories branch into master
Questions
- long URLs that wrap are broken
- Access denied error when trying to publish the gem
- Instructions for Installation/Usage/Development on README
- rspec error when running console
Future additions (?)
- Add "list by venue" functionality to CLI
- Add "list all" functionality to CLI
- Add "More info?" for events -> open in browser window if yes
Error handling for 404 error
MAX_ATTEMPTS = 10
doc = nil begin doc = Nokogiri::HTML(open(url).read.strip) rescue Exception => ex log.error "Error: #{ex}" attempts = attempts + 1 retry if(attempts < MAX_ATTEMPTS) end
if(doc.nil?) puts "Sorry - the website is not responding. Please try again later." else [continue with scrape code] end