Ingyenes Microsoft ebook-ok

írta: Blindmouse, 7 éve

Microsoft egy csomó ebook-ot ad ingyen.
Mivel tudom, hogy ez egy csomó embernek hasznos lehet itt, ezért itt a link hozzá.
https://blogs.msdn.microsoft.com/mssmallbiz/2017/07/11/largest-free-microsoft-ebook-giveaway-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepo/

De ugye, kinek van kedve letölteni egyesével ezeket?
Ugyan ott van egy powershell szkript, de powershell sucks.
Ezért itt egy python kód, letölteni az összeset. Lehet kritizálni, nem töltöttem el sok időt az írásával.

import os
import urllib2
file2 = urllib2.urlopen("http://www.mssmallbiz.com/ericligman/Key_Shorts/Ligman_eBooks_2017.txt")
with open("redirectlist.txt",'wb') as output:
output.write(file2.read())
with open("redirectlist.txt") as f:
inurls = f.readlines()
for url1 in inurls:
try:
url1 = urllib2.urlopen(url1)
filename = os.path.basename(urllib2.urlparse.urlparse(url1.url).path)
url2 = url1.url
print url2
print filename
file2 = urllib2.urlopen(url2)
with open(filename,'wb') as output:
output.write(file2.read())
except:
pass