我想在获得src之后获得视频标签。但是当我用jsoup解析时,找不到它。 网页放置在mix.tj/video/113989.html
此代码我解析了网站
class Loading extends AsyncTask<Void,Void,Void>{
Document document = null;
@Override
protected Void doInBackground(Void... voids) {
try {
document = Jsoup.connect("http://mix.tj/video/113989.html").get();
} catch (IOException e) {
e.printStackTrace();
}
if(document != null)
{
Log.e("hello",document.getElementsByTag("link").attr("href"));
Log.e("hello",document.getElementsByTag("video").attr("src"));
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
}
网站只有1个标签视频
我发现了问题。在html代码中有创建此视频的脚本
<script>var player = jwplayer('player-embed');
player.setup({"file": "http://dushanbe.mix.tj/video/2/45/5bafae1306081.mp4", "image": "/img/b/7/42/113989.jpg", "aspectratio": "16:9", "autostart": false, "controls": true, "displaydescription": false, "displaytitle": false, "flashplayer": "/player/jwplayer-7.8.7/jwplayer.flash.swf", "key": "n+94L7vjfQNGEin57ap3glk3iRNum2o7AeOIWw==", "mute": false, "ph": 1, "pid": "mS6Np6yN", "preload": "auto", "primary": "html5", "repeat": false, "stagevideo": false, "stretching": "uniform", "width": "100%"});</script>
我有一个新问题。它是谁做的?