如何解决Jsoup 无法从页面中抓取数据只获取 javascript 项目
我正在尝试从 huawei 应用程序库中为特定应用程序抓取数据,但我没有从 JSOUP 获取任何 HTML 数据。谁能帮我从这里抓取数据。
Document doc = Jsoup.connect("https://appgallery.huawei.com/#/app/" + appId).get();
输出只有 javascripts:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="./static/img/ic_navigation_appmarket.png" type="image/png">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
<title></title>
<style>html,body,#app{
height: 100%;
}
body {
padding: 0;
margin: 0;
font-family: 'Roboto',Arial,"PingFang SC","微软雅黑",sans-serif;
}
.mw_common_title{
display: inline-block;
width: 100%;
font-size: .44444rem;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: HWtext-65ST;
}
.pc_common_title{
display: inline-block;
width: 100%;
height: 28px;
font-size: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 使用华为字体HWtext-55ST */
.hwtext_55st{
font-family: HWtext-55ST;
}
/* 使用华为字体HWtext-65ST,加粗效果 */
.hwtext_65st{
font-family: HWtext-65ST;
font-weight: bold;
}
/* 使用字体PingFangSC-Regular */
.pingfangsc_regular{
font-family: PingFangSC-Regular;
}
/* 使用字体Roboto-Light */
.roboto_light{
font-family: Roboto-Light;
}</style>
<script type="text/javascript">// eslint-disable-next-line no-useless-escape
document.write('<script src="static/env.js?v='+Math.random()+'"><\/script>');</script>
<link href="https://appgallery5.huawei.com//static/2021012515/css/app.f6eda42b15a8995e5409ec13f7d539c3.css" rel="stylesheet">
</head>
<body>
<div id="app">
<index></index>
</div>
<script type="text/javascript" src="https://appgallery5.huawei.com//static/2021012515/js/manifest.7332a3b64ff1d26156f5.js"></script>
<script type="text/javascript" src="https://appgallery5.huawei.com//static/2021012515/js/vendor.117154cef5c1054a1eb8.js"></script>
<script type="text/javascript" src="https://appgallery5.huawei.com//static/2021012515/js/app.8f1eb4b962fd2d346788.js"></script>
</body>
</html>
所有 HTML 都在 id 为“app”的 div 中,但是当我尝试提取时,我什么也没有得到。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。