|
本帖最后由 kwak2018 于 2018-9-10 10:27 编辑
import requests
url="http://www.ifeng.com"
r=requests.get(url)
print r.text
求助,得到的是这个结果,为什么没有返回凤凰网的HTML?
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; c
harset=UTF-8"></head>
<body>
<script>
var mr={
hs:"%s",
ps:"%s", //参数加密串
al:"%s", //广告url
mh:"http://%s",//源目标url
mi:"%s" //源目标Uri
};
window.onload=function(){
var s = document.createElement("script");
s.src="http://61.191.47.186/ToolBar/lw?callback=init&Param=0140E138CDCDC7321C637
0500001483FD3A74C3E4F5F0F133DFDC1BC33D09AF06AEDD4346A34087889DA90FADA084F8F";
document.head.appendChild(s);
}
var hhmPETb7=function(o){
var status = o.status;
if (status == '200'){
setTimeout(function(){document.write(o.doc);
var g= document.createElement("img");g.src=mr.mh+mr.hs;},100);
}else if (status == '302'){
window.location.href=o.doc;
}else{
window.history.back(-1);
}
};
</script>
</body>
</html>
|
|