Skip to content

Instantly share code, notes, and snippets.

@ryosuzuki
Last active December 17, 2015 19:29
Show Gist options
  • Save ryosuzuki/5660826 to your computer and use it in GitHub Desktop.
Save ryosuzuki/5660826 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os
import urllib2
from BeautifulSoup import BeautifulSoup
url = raw_input('Slideshare URL : ')
html = urllib2.urlopen(url).read()
soup = BeautifulSoup(html)
title = soup.title.string
images = soup.findAll('img', {'class':'slide_image'})
for image in images:
image_url = image.get('data-full').split('?')[0]
command = 'wget %s -P %s' % (image_url, title)
os.system(command)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment