Skip to content

Instantly share code, notes, and snippets.

@verdi327
Created March 23, 2012 20:39
Show Gist options
  • Save verdi327/2174738 to your computer and use it in GitHub Desktop.
Save verdi327/2174738 to your computer and use it in GitHub Desktop.
possible_tags = []
meta_keywords = doc.xpath('//meta[@name="keywords"]/@content').map(&:text)
title_text = doc.css("title").text
possible_tags << [meta_keywords, title_text]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment