`
fireflyman
  • 浏览: 118369 次
  • 性别: Icon_minigender_1
  • 来自: 火星
社区版块
存档分类
最新评论

open-uri(貌似挺好玩)

    博客分类:
  • ROR
F# 
阅读更多

http://ftp.iteye.com/public/csdn/cloud_950-60.jpg
http://ftp.iteye.com/public/alibaba/yunjisuan/728x90.jpg?2010-4-29
http://ftp.iteye.com/public/runqian/a5_runqian.gif?20100522
http://ftp.iteye.com/public/csdn/Ad-HASP.jpg?2010-05-19
http://ftp.iteye.com/public/zly/msup.gif?2010-5-18
http://ftp.iteye.com/public/zly/supcan.jpg?20100422

require 'open-uri'
 open('http://www.iteye.com') do |f|
  puts f.read.scan(/<img src="(.*?)"/m).uniq
 end
 

 

 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics