網址:http://open.163.com/newview/movie/free?pid=M9THK5V42&mid=M9THL2UO9
需要獲取視頻的鏈接,我的代碼不行啊
import java.io.IOException;
import javax.lang.model.element.Element;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
public class NewTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
Document document = Jsoup.connect("http://open.163.com/newview/movie/free?pid=M9THK5V42&mid=M9THL2UO9").get();
Elements input=document.select("#__layout > div > div.m-main > div.m-main__videobox > div.video-module > div > div.video-content>div.video-main");
String videourl=input.tagName("video").attr("autoplay src");
System.out.println("nothing"+videourl);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("連接失敗");
}
}
}
我的結果:
nothing
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/230465.html
標籤:Android
