Unable to save image from web using urllib2
问题 I want to save some images from a website using python urllib2 but when I run the code it saves something else. This is my code: user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' headers = { 'User-Agent' : user_agent } url = "http://m.jaaar.com/" r = urllib2.Request(url, headers=headers) page = urllib2.urlopen(r).read() soup = BeautifulSoup(page) imgTags = soup.findAll('img') imgTags = imgTags[1:] for imgTag in imgTags: imgUrl = "http://www.jaaar.com" + imgTag['src'] imgUrl =