How should I scrape these images without errors?
问题 I'm trying to scrape the images (or the images link) of this forum (http://www.xossip.com/showthread.php?t=1384077) . I've tried beautiful soup 4 and here is the code I tried: import requests from bs4 import BeautifulSoup def spider(max_pages): page = 1 while page <= max_pages: url = 'http://www.xossip.com/showthread.php?t=1384077&page=' + str(page) sourcecode= requests.get(url) plaintext = sourcecode.text soup = BeautifulSoup(plaintext) for link in soup.findAll('a',{'class': 'alt1'}): src =