Downloading content from Gale-Cengage


Here is a very simple script written in Python. It downloads all the images of one or several books into the directory where the script is.  Unfortunately WordPress does not allow to upload the script (either in .py or .txt), so here it is. → are for indentations.

Remember that, depending on the content set (see here), the images are either in .tiff or in .jpg.


import urllib2

#set the list of books you want to download. For this script, we start from each book's first page, i.e the book id+00010
idlist = ['012000180000010',

for i in idlist:

→while int(i) <= end :

→→url = ""+str(i)+"&contentSet=ECLW"

→→print url
→→→req = urllib2.Request(url)

→→→req.add_header('User-agent', 'Mozilla 5.10')
→→→dl = urllib2.urlopen(req)

→→→with open(str(i)+'.tiff', 'wb') as f:
→→→→while True:
→→→→→content =
→→→→→if not content: break

→→except urllib2.HTTPError:




One thought on “Downloading content from Gale-Cengage

  1. […] you have used a small script and downloaded the 120 pages of the book you are interested in (and want to liberate). Good for […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: