1 2 3 4 5 6 7 8 9 10 11 |
#!/usr/bin/env ruby
url = ARGV[0];
id = url.match(/v=(.*)/)[1]
doc = Hpricot::parse(open(url))
(doc/'img.vimgSm').each {|img| puts img.attributes["src"] if img.attributes["src"] =~ // }
|
Pastie
Support Pastie
or read my
Pastie << self
blog
1 2 3 4 5 6 7 8 9 10 11 |
#!/usr/bin/env ruby
url = ARGV[0];
id = url.match(/v=(.*)/)[1]
doc = Hpricot::parse(open(url))
(doc/'img.vimgSm').each {|img| puts img.attributes["src"] if img.attributes["src"] =~ // }
|