Jul-13-2018, 07:34 AM
I can save multiple web pages with using these codes; however, I cant see a proper website view after saving them as html. For example, the texts in table are slipped and images can't be seen. I need to download entire pages just as we do save as in any web browser so that I can see a proper view.
import urllib.request url= 'https://asd.com/asdID=' for i in range(1, 5): print(' --> ID:', i) newurl = url + str(i) f = open(str(i)+'.html', 'w') page = urllib.request.urlopen(newurl) pagetext = str(page.read()) f.write(pagetext) f.close()