<reponame>wideshreck/PubHtml-Image-Dump<filename>pubhtml5Dump.py
import requests
import shutil

url = input("Url --> ")
firstPage = int(input("First page --> "))
finalPage = int(input("Final page --> "))
fileDestination = input("File destination for saved images --> ")
finalPage = finalPage + 1
for x in range(firstPage, finalPage):

    filename = str(x) + ".jpg"
    imageDestination = fileDestination + "/" + filename
    image_url = url + "/files/large/" + filename

    r = requests.get(image_url, stream = True)

    if r.status_code == 200:
        r.raw.decode_content = True
        with open(imageDestination,'wb') as f:
            shutil.copyfileobj(r.raw, f)
        print('Image sucessfully Downloaded: ',filename)
        
    else:
        print('Image Couldn\'t be retreived: ', filename)

import requests
import shutil

url = input("Url --> ")
firstPage = int(input("First page --> "))
finalPage = int(input("Final page --> "))
fileDestination = input("File destination for saved images --> ")
finalPage = finalPage + 1
for x in range(firstPage, finalPage):

    filename = str(x) + ".jpg"
    imageDestination = fileDestination + "/" + filename
    image_url = url + "/files/large/" + filename

    r = requests.get(image_url, stream = True)

    if r.status_code == 200:
        r.raw.decode_content = True
        with open(imageDestination,'wb') as f:
            shutil.copyfileobj(r.raw, f)
        print('Image sucessfully Downloaded: ',filename)
        
    else:
        print('Image Couldn\'t be retreived: ', filename)