website_information 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f88be19502a7b45f687015f4851033e55909673
4
- data.tar.gz: cde7c3a8533258bf7436034e5fc61d221bd919e3
3
+ metadata.gz: 7f22bb65ecc7e710a1ceddd267f47411437c03ad
4
+ data.tar.gz: 994078f1466d344765f2a8fe1ae5c9a8402c4fb7
5
5
  SHA512:
6
- metadata.gz: 06a52f45e20f074d4a2a2307c6b20b357fea66656bf83894ec3993159054b4347a1535b19d1b9ed29b7dadcc768cb90a2d15ad137469f16db96291e29ae5b4a5
7
- data.tar.gz: 6df7a8dc4d94d2012d03d7e1b696900e4995684bb6ce1ebbbd349d8438db7de07e22e46a61f8c3569149b907f13d7523ffbfd2c8ab4cac773ff513b52ff75236
6
+ metadata.gz: a6bd049a8e4824f58088b78e71699eb933e970c6f2ef2159ccdf406d08f8e7bd55e439757f1407f6bce10c244203a3611e0ebc16051d43f5129f11dbd8a03464
7
+ data.tar.gz: 23ccf9d0e98fe4095edd227d08981f2ebdf72dc8a0862719fa428374b89059526e7d36002b7086f7fa80d4e527de87239bc0f648e697a622de725ab3a6c1d7c4
@@ -1,3 +1,3 @@
1
1
  module WebsiteInformation
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -16,7 +16,7 @@ module WebsiteInformation
16
16
  def scrape(url)
17
17
  doc = ::Nokogiri::HTML(open(url))
18
18
  @params.title = doc.title
19
- @params.meta.description = doc.css('//meta[name$="description"]/@content').first.value
19
+ @params.meta.description = doc.css('//meta[name$="description"]/@content').first.try(:value)
20
20
  @params.meta.keyword = doc.css('//meta[name$="keyword"]/@content')
21
21
  @params.og.site_name = doc.css('//meta[property$="og:site_name"]/@content').to_s
22
22
  @params.og.description = doc.css('//meta[property="og:description"]/@content').to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: website_information
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - miraoto