kristing81/Blocmetrics — pull request #3 by kristing81 (2014-11-07 10:14:03+00:00)
Title: WIP site scraping

Hi Elad

I've been working on the following method today to check the verification code. I'm nowhere near done, but I wanted to check if I'm on the right path.

```
def check_verification
url = tracked_domain.url
# Use HTTParty to fetch the HTML of the tracked domain.
response = HTTParty.get(url)
# Use nokogiri using XPATH to get the content of the meta tag and compare to current tracked domain verification code.
doc = Nokogiri::HTML(open(url).read)
vercode = doc.xpath("//meta")
# return true or false
if vercode == tracked_domain.verification_code
puts "The Domain has been verified"
else
puts "This Domain is not verified"
end
end
```

Also in my ``` app/models/tracked_domain.rb``` file, should I require or include HTTParty and Nokogiri?

Thanks!