Hi all,
I’ve been at this for a few hours now, and not getting much further:
I want to read a bunch of urls, listed on each seperate line in a txt
file.
I then want to use these seperate urls and do a DO EACH method (a
nokogiri parse) for all these urls.
What i’m trying now is:
f = File.open(“file.txt”, “r”)
f.each_line do |lijn|
searchableurl = Nokogiri::HTML (lijn)
It is not giving an error, nor is it working.
Another I’ve been trying:
f = File.open(“file.txt”, “r”)
while !f.eof?
line = f.readline
searchableurl = Nokogiri::HTML(line)
Is this the wrong way of getting and then using each url?
Does it have to do with linebreaks?
thanks.