#!/usr/bin/env python
# encoding: utf-8
#導入模塊
import re
import urllib
from bs4 import BeautifulSouphtml
f=urllib.urlopen('https://book.douban.com/top250?start=225')
htmlCode = f.read()
htmlCode.find('src')
imageList=re.findall(r'src="(.*?\.(jpg|png))"',htmlCode)
j=1
for i in imageList :
imageUrl = i[0]
urllib.urlretrieve(imageUrl,'./images/%d.jpg'%j)
j+=1python