lib/scrap_kit/recipe.rb in scrap_kit-0.1.6 vs lib/scrap_kit/recipe.rb in scrap_kit-0.1.7

- old
+ new

@@ -46,10 +46,11 @@ elements.filter do |element| condition_key = condition.keys.first.to_s condition_value = condition.values.first found_element = element.element(css: condition_key) - extract_value_from_element(found_element) == condition_value + extracted_value = extract_value_from_element(found_element) + extracted_value.match(condition_value) || extracted_value == condition_value end end end def extract_value_from_element(element)