Created
April 4, 2014 08:49
-
-
Save jberkel/9970719 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
def html = new URL("http://www.gifbin.com/random").getText() | |
def images = html =~ /img src=['"](http:\/[^"']*\.gif)['"]/ | |
def gif = images.collect { it[1] }[0] | |
if (gif != null) { | |
%> | |
<img src="<%= gif %>"/> | |
<% } %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment