Created
November 3, 2020 13:34
-
-
Save wizardofzos/6231f043d5bccc300ef8cef44aae54f9 to your computer and use it in GitHub Desktop.
gseukslides.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import string | |
print "let's download all the GSEUK20 slides we can..." | |
#for i in string.digits: | |
for i in ['1','2','3','4','5','6']: | |
for a in ['A','B','C']: | |
for b in string.ascii_uppercase: | |
for ext in ['pdf', 'ppt', 'pptx', 'doc']: | |
deck = "%s%s%s.%s" % (i,a,b,ext) | |
url = "http://conferences.gse.org.uk/2020/presentations/%s" % deck | |
print "Trying to get %s" % url, | |
status = "ok" | |
try: | |
coolslidesdata = urllib2.urlopen(url) | |
except: | |
status = "meh" | |
print " Meh" | |
if status == "ok": | |
print " Gotcha!" | |
coolslides = coolslidesdata.read() | |
with open(deck, 'wb') as slidedeck: | |
slidedeck.write(coolslides) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment