import requests from bs4 import BeautifulSoup import urllib.request url = 'http://desk.zol.com.cn/dongman/1366x768/hot_3.html' # for i in range(3): print(url) req = requests.get(url) html = req.text print(req.encoding) soup = BeautifulSoup(html, 'lxml')#,from_encoding='utf-8' result = soup.find_all('a', class_='pic') #print(result.encoding('utf-8')) print(result)
大咪