This seems like it should be simple, but I can’t find any answer with the docs or google. I’m on a Mac. OSX Yosemite 10.10.5 I want to save a webpage as a webarchive, and not just get the text. I hope there’s a way to do it without saving all of the images separately. And even if I do have to download them separately, then how would I combine everything into the HTM webarchive?
stuff = urllib.urlopen(url).read() f = open(“file_name”, “w”) f.write(stuff) f.close() The file_name is just the the text. I realize that the solution to this will require “wb” due to the file type. Other than that, I’m completely stuck. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor