metainspector 1.9.4 → 1.9.5
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.
- data/lib/meta_inspector/scraper.rb +2 -1
- data/lib/meta_inspector/version.rb +1 -1
- data/spec/fixtures/twitter_w3clove.response +4232 -0
- data/spec/metainspector_spec.rb +27 -19
- metadata +4 -3
@@ -154,12 +154,13 @@ module MetaInspector
|
|
154
154
|
|
155
155
|
def parsed_images
|
156
156
|
@parsed_images ||= parsed_document.search('//img') \
|
157
|
-
.reject{|i| i.attributes['src'].
|
157
|
+
.reject{|i| (i.attributes['src'].nil? || i.attributes['src'].value.empty?) } \
|
158
158
|
.map{ |i| i.attributes['src'].value }.uniq
|
159
159
|
end
|
160
160
|
|
161
161
|
# Stores the error for later inspection
|
162
162
|
def add_fatal_error(error)
|
163
|
+
warn error
|
163
164
|
@errors << error
|
164
165
|
end
|
165
166
|
|