SoFunction
Updated on 2024-10-28

python BeautifulSoup to set the page's encoding


import urllib2 
from BeautifulSoup import BeautifulSoup 
 
page = ('http://'); 
soup = BeautifulSoup(page,from_encoding="gb2312") 
 
print
print ()