【发布时间】:2019-10-10 16:45:17
【问题描述】:
我正在使用 chrome 的开发人员页面向https://racing.appledaily.com.hk/race-day/race-position?raceDay=1865&race=15632 发出获取请求,我可以看到完整的 html 页面。但是,当我发出 get 请求时,python 只返回部分 html。
HTML:
<html class="gr__racinng_applledaily_com_hk" style='overflow: initial;">
<head> ... </head>
<body data-gr-c-s-loaded="true">
<!-- Google Tag Mananger (noscript) -->
<noscript> ...</noscript>
<!-- End Google Tag Mananger (noscript) -->
<div data-v-6223d6a8 id="app" class="web"> ... </div>
</body>
</html>
<div data-v-6223d6a8 id="app" class="web"> ... </div> 部分丢失
使用的代码:
content = request.get('https://racing.appledaily.com.hk/race-day/race-position?raceDay=1865&race=15632')
【问题讨论】: