Skip to content

Instantly share code, notes, and snippets.

@Christian-G
Last active May 27, 2019 02:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Christian-G/ace18e68add60835ef342743161c9a58 to your computer and use it in GitHub Desktop.
Save Christian-G/ace18e68add60835ef342743161c9a58 to your computer and use it in GitHub Desktop.
Download profile pictures from Slack, use in combination with slack image scraper: https://gist.github.com/Christian-G/ccad3257e68c4b31d790c4ed66a51761
require 'open-uri'
require 'json'
class Profile
DATA = JSON.parse('<data object>')
end
Profile::DATA.each do |profile|
location = profile.last.sub('https', 'http')
name = profile.first
begin
open("#{name}.jpg", 'wb') do |file|
file << open(location).read
end
rescue
next
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment