November 2017
Intermediate to advanced
226 pages
5h 59m
English
For this, we can write a Python script that can download all JPG images in a web page:
import urllib2 import re from os.path import basename from urlparse import urlsplit
url='https://www.packtpub.com/'
response = urllib2.urlopen(url)
source = response.read()
file = open("packtpub.txt", "w")
file.write(source)
file.close()
patten = '(http)?s?:?(\/\/[^"]*\.(?:png|jpg|jpeg|gif|png|svg))' for line in open('packtpub.txt'): ...Read now
Unlock full access