Skip to content

Instantly share code, notes, and snippets.

@zahhar zahhar/
Last active Aug 7, 2018

What would you like to do?
import sys
import json
import shutil
import unicodedata
import re
import os
from six.moves import urllib
target = "Downloads"
if len(sys.argv) != 2:
print("USAGE: file.json")
print("Reading %s file..." % sys.argv[1])
with open(sys.argv[1], 'r') as fp:
slideshows = json.load(fp)
n = len(slideshows['slideshows_uploaded'])
print("Success! %i entries found." % n)
if not os.path.exists(target):
print("Downloading into new folder '%s'" % target)
print("Downloading into existing folder '%s'" % target)
for i, s in enumerate(slideshows['slideshows_uploaded']):
print("Downloading entry %i of %i" % (i+1, n))
match ='.+\.([\w]+)\??', s['download_url'])
if match:
extension =
fname = unicodedata.normalize('NFKD', s['title'])
fname = fname+" - "+s['category']+"."+extension
infile = urllib.request.urlopen(s['download_url'])
outfile = open(target+'/'+fname, 'wb')
shutil.copyfileobj(infile, outfile)
print("%s => %s" % (s['category'], fname))
print("WARNING: Can't get extension for %s, skipping" % s['download_url'])
except urllib.error.HTTPError as e:
print("WARNING: %s %s while reading %s, skipping" % (e.code, e.reason, s['download_url']))
except IndexError:
print("WARNING: Can't get extension for %s, skipping" % s['download_url'])
except ValueError:
print("ERROR: Incorrect file format, JSON expected")
"slideshows_uploaded": [
"title": "Где кончается проектирование и начинается дизайн?",
"description": "Как можно сделать максимально правдобный пототип и при этом не заиграться в дизайн? Как обсуждать прототип с клиентом, чтобы не уйти от прототипирования в рисование? Что использовать?\r\n\r\nПрезентация была подготовлена для выступления на, где мы вещали вместе с Ольгой Павловой.",
"tag": "",
"category": "presentation",
"language": "ru",
"privacy": "public",
"url": "",
"download_url": ""
"title": "Структура задач и решений при создании и эксплуатации интернет-магазина",
"description": "23 мая 2013, семинар «Создание и продвижение интернет-магазина» (, СПб. Докладчик от «Собаки Павловой» — Наталья Прокофьева.",
"tag": "",
"category": "presentation",
"language": "ru",
"privacy": "public",
"url": "",
"download_url": ""
"title": "Как начать? Боремся со страхом чистого листа в проектировании интерфейсов",
"description": "25 мая 2013, HackDay # 27 (, СПб. Докладчик — Ольга Павлова.",
"tag": "ux, ui, проектирование, prototyping, design, start, howto",
"category": "presentation",
"language": "ru",
"privacy": "public",
"url": "",
"download_url": ""

This comment has been minimized.

Copy link
Owner Author

commented Jul 31, 2018


This Python script uses SlideShare JSON export file to download everything (slideshows, videos, documents, etc.) that you have uploaded to SlideShare. Script should work with MacOS system Python (version 2.7) as well as with latest 3.x versions.


  1. Log into your SlideShare account
  2. Navigate to Account settings -> Export
  3. Click "Export JSON" to download file that includes a list of users that you are following, various account information and contact details, and a list of all slideshows that you have uploaded. Note, that provided download links expire after 7 days. Sample of my export file is displayed above as "sh-sample.json".
  4. Save to your computer.
  5. Execute in Terminal:

python sh-sample.json

  1. Script will create Download folder, and starts populating it with files downloaded from your Slideshare. Note, that script shows progress only after each file is downloaded. It means you do will face delays when "nothing happens" on the screen if internet connection is slow, or files to transfer are very large.



If you are using Python3, you most probably have to install six module first:
pip3 install six
pip install six

And if you do not have pip installed for some reason, then
sudo python -m ensurepip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.