import requests
url = "https://www.zhipin.com/c101010100-p100109/?query=python" #请求地址
headers = {"User-Agent": "Mozilla/5.0"} #请求头
response = requests.get(url,headers=headers)
html = response.text
print(html)
如上为python代码
得到的代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>请ç¨å</title>
<style>
html,
body {
margin: 0;
width: 100%;
height: 100%;
}
@keyframes bossLoading {
0% {
transform: translate3d(0, 0, 0);
}
50% {
transform: translate3d(0, -10px, 0);
}
}
.data-tips {
text-align: center;
height: 100%;
position: relative;
background: #fff;
top: 50%;
margin-top: -37px;
}
.data-tips .boss-loading {
width: 100%;
}
.data-tips .boss-loading p {
margin-top: 10px;
color: #9fa3b0;
}
.boss-loading .component-b,
.boss-loading .component-s1,
.boss-loading .component-o,
.boss-loading .component-s2 {
display: inline-block;
width: 40px;
height: 42px;
line-height: 42px;
font-family: Helvetica Neue,Helvetica,Arial,Hiragino Sans GB,Hiragino Sans GB W3,Microsoft YaHei UI,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;
font-weight: bolder;
font-size: 40px;
color: #eceef2;
vertical-align: top;
-webkit-animation-fill-mode: both;
-webkit-animation: bossLoading 0.6s infinite linear alternate;
-moz-animation: bossLoading 0.6s infinite linear alternate;
animation: bossLoading 0.6s infinite linear alternate;
}
.boss-loading .component-o {
-webkit-animation-delay: 0.1s;
-moz-animation-delay: 0.1s;
animation-delay: 0.1s;
}
.boss-loading .component-s1 {
-webkit-animation-delay: 0.2s;
-moz-animation-delay: 0.2s;
animation-delay: 0.2s;
}
.boss-loading .component-s2 {
-webkit-animation-delay: 0.3s;
-moz-animation-delay: 0.3s;
animation-delay: 0.3s;
}
</style>
</head>
<body>
<div class="data-tips">
<div class="tip-inner">
<div class="boss-loading">
<span class="component-b">B</span><span class="component-o">O</span><span class="component-s1">S</span><span class="component-s2">S</span>
<p class="gray">æ£å¨å è½½ä¸...</p>
</div>
</div>
</div>
<script>
这里省略
</script>
</body>
</html>