Hello,
I 'll try to be as explicit as possible I am using nokogiri to parse links from paths and rules out of a database
I have this model:
--- !ruby/object:Content
attributes:
id: "2"
name: http://www.****** try
description: try
url_base: http://www.******
scan_flv: /"file","([^<>]*flv)"\);/imu
source_site_id: "2"
content_id: "2"
attributes_cache: {}
In my application:
sub_flv = Nokogiri::HTML(open(suburlflv))
sub_flv.search(url.path_flv).each do |flv|
@flv << flv.content.scan(/"file","([^<>]*flv)"\);/imu)
end
Workds fine and successfully returns something - http://www.********.flv
Now I have url.scan_flv from the Content model with /"file","([^<>]*flv)"\);/imu
inside
When I do
sub_flv = Nokogiri::HTML(open(suburlflv))
sub_flv.search(url.path_flv).each do |flv|
@flv << flv.content.scan(url.scan_flv)
end
I just got nothing parsed...
Can somebody enlight me on this problem? I think it is related to encoding out of url.scan_flv. There is a method I should use?
Thanks in advance