from urllib.request import urlopen
from bs4 import BeautifulSoup
import urllib.request
# -*- coding: utf-8 -*-
html=urlopen("http://hq.sinajs.cn/list=s_sh000001")
str(html.read(),"gbk")
混合编码的网页:
http://esf.sz.fang.com/house/d2100-g23/
from bs4 import BeautifulSoup
import urllib.request
# -*- coding: utf-8 -*-
html=urlopen("http://hq.sinajs.cn/list=s_sh000001")
str(html.read(),"gbk")
混合编码的网页:
http://esf.sz.fang.com/house/d2100-g23/

