Skip to content

Instantly share code, notes, and snippets.

@jberkel
Created April 4, 2014 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jberkel/9970719 to your computer and use it in GitHub Desktop.
Save jberkel/9970719 to your computer and use it in GitHub Desktop.
<%
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