Skip to content

Instantly share code, notes, and snippets.

@bpostlethwaite
Created July 25, 2014 15:27
Show Gist options
  • Save bpostlethwaite/312ef8ec38f104de6471 to your computer and use it in GitHub Desktop.
Save bpostlethwaite/312ef8ec38f104de6471 to your computer and use it in GitHub Desktop.
extract all the gif img tags from 8tracks
var tmp = $('<div></div>')
$('body').prepend(tmp)
tmp.css('height', 400)
tmp.css('width', 900)
tmp.css('overflow', 'scroll')
a = $('#feed-container').find('li')
for (var i = 0; i < a.length; i++) {
var img = $(a[i]).find('.grid_square .cover')[0]
if (!img) continue
var src = img.src
var idx = src.indexOf('.gif')
if (idx !== -1) {
src = src.substr(0, idx + '.gif'.length)
tmp.append('<div>'+src+'</div></br>')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment