extractula 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/lib/extractula.rb CHANGED
@@ -9,7 +9,7 @@ require 'extractula/extracted_content'
9
9
  require 'extractula/extractor'
10
10
 
11
11
  module Extractula
12
- VERSION = "0.0.10"
12
+ VERSION = "0.0.11"
13
13
 
14
14
  @extractors = []
15
15
 
@@ -130,7 +130,7 @@ class Extractula::Extractor
130
130
  end
131
131
 
132
132
  def extract_content
133
- fragment = content_node ? content_node.inner_html.strip : ""
133
+ content_node ? content_node.inner_html.strip : ""
134
134
  end
135
135
 
136
136
  def candidate_nodes
@@ -98,15 +98,15 @@ module Extractula
98
98
  end
99
99
 
100
100
  def title
101
- oembed.title
101
+ oembed ? oembed.title : super
102
102
  end
103
103
 
104
104
  def image_urls
105
- [ oembed.url ] if oembed.type == 'photo'
105
+ [ oembed.url ] if oembed && oembed.type == 'photo'
106
106
  end
107
107
 
108
108
  def video_embed
109
- oembed.html
109
+ oembed.html if oembed
110
110
  end
111
111
  end
112
112
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 10
9
- version: 0.0.10
8
+ - 11
9
+ version: 0.0.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Dix