Created
January 31, 2010 16:44
-
-
Save ka010/291141 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 urllib | |
import os | |
dirlist = ['dsintro', 'socketbasedds', 'remotecalls','distributedobjects', 'distributedservices1', 'distributedservices2', 'security1', 'components', 'systemmanagement', 'designissues', 'webservices', 'peertopeer', 'soa', ] | |
for dir in dirlist: | |
i=1 | |
for i in range(1,100): | |
try: | |
print '** Processing : ' + dir + ' Slide#: ' + str(i) | |
page = urllib.urlopen('http://www.kriha.de/krihaorg/docs/lectures/distributedsystems/'+ dir + '/pictures/Folie'+str(i)+'.PNG').read() | |
if '404 Not Found' in page: | |
print '** No more slides here, moving on...' | |
break | |
else: | |
f = open(str(dirlist.index(dir)) + '-' + dir + '_slide'+str(i)+'.png','w') | |
f.write(page) | |
except: | |
print '** Error, something went wrong..' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment