Em đang lấy 1 đoạn iframe từ web phim bằng java IDE netbeans nhưng không được
Thư viện em đang dùng là jsoup
Code JAVA
Document doc_film2 = Jsoup.connect("https://anime47.com/xem-phim-tuyet-ung-link-chu-ep-01/158279.html")
.userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36");
.
get();
Element get_data1 = doc_films.tagName("iframe");
System.out.println("get_data1 = " + get_data1);
Đây là đoạn code khi hiển thị trên trình duyệt - em cần lấy thẻ iframe kia. Em dùng jsoup nhưng chỉ lấy được đến thẻ media còn thẻ trong đó thì không xuất hiện
Khi e view source thì cũng k có thẻ ấy luôn
đoạn hiển thị trên trình duyệt
<div class="movie-info">
<div class="block-movie-info movie-info-box">
<div class="block media" id="page-watch">
<div id="abd_mv">
<div id="player-area" style="width:100%;height:100%;">
<script type="text/javascript">
jwplayer.key="dWwDdbLI0ul1clbtlw+4/UHPxlYmLoE9Ii9QEw==";
</script>
<div id="player" tabindex="0" style="width: 100%; height: 100%;"
class="jwplayer jw-reset jw-state-paused jw-skin-beelden jw-stretch-uniform jw-breakpoint-4 jw-flag-user-inactive">
<iframe
src="https://www.fembed.com/v/p6vg34pwx9j"
scrolling="no"
frameborder="0"
width="100%"
height="100%"
allowfullscreen="true"
webkitallowfullscreen="true"
mozallowfullscreen="true">
</iframe>
</div>
</div>
<script type="text/javascript"></script>
<style type="text/css"></style>
<script>
playerInstance.on('firstFrame', function() {
document.getElementById('player').innerHTML = `
<iframe
src="https://www.fembed.com/v/p6vg34pwx9j"
scrolling="no"
frameborder="0"
width="100%"
height="100%"
allowfullscreen="true"
webkitallowfullscreen="true"
mozallowfullscreen="true">
</iframe>`;
});
</script>
</div>
</div>
</div>
</div>
Còn đây là đoạn nguồn khi e view source
<div class="movie-info"><div class="block-movie-info movie-info-box">
<div class="block media" id="page-watch">
<div id="abd_mv">
<div id="player-area" style="width:100%;height:100%;"><div id="media" style="width:100%;height:100%;">
</div></div>
</div>
E đoán là đoạn iframe đã bị ẩn hoặc khi chạy đoạn script nào đó mới hiện
Ai có kinh nghiệm hoặc hướng đi nào chỉ cho em với ạ. Hoặc có thư viện nào mạnh hơn thì chỉ em ạ