使用Node的open-uri模块,是否有可能打开多个页面?例如,用户的博客可能有10页。Open URI - 打开多个页面
红宝石
index = 1
downloads = []
page = open("http://#{user_name}.tumblr.com/page/#{index.to_s}") do |page|
page.each_line do |line|
downloads.push($&) if line =~ regex
end
end
您的ruby代码实际上打开了多个页面吗? – shanet
^^^我很混乱。你是对的。现在我看到如何处理这个问题。 – theGrayFox