javascript - I can't get value from script to jsoup -


i want code value stream fail.

how value stream : http://123.30.215.65/hls/4545780bfa790819/5/3/d836ad614748cdab11c9df291254cf836f21144da20bf08142455a8735b328ca/dnr2mq==_m.m3u8 using jsoup ?

   <html>   <head>    <style>html,body{margin:0;padding:0;background:#000;;}</style>    <meta charset="utf-8">    <script src="https://code.jquery.com/jquery-2.1.4.js"></script>    <script type="text/javascript" src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>    <meta name="referrer" content="no-referrer">   </head>         <body>     <div style="width: 100%;">     </div>     <div id="player"></div>     <script>  	player = new clappr.player({source: "http://123.30.215.65/hls/4545780bfa790819/5/3/d836ad614748cdab11c9df291254cf836f21144da20bf08142455a8735b328ca/dnr2mq==_m.m3u8",  			parentid: '#player',  			width: '100%', height: "100%",  		    hidemediacontrol: true,  		    autoplay: true  					        });	  	</script>      </body>  </html>

java code me :

elements script = doc.select("script"); pattern p = pattern.compile("player = new clappr.player(\\(\"source:{\", \"(.*)\", false\\)");                                                     //  ^^ capturing group string url = "";  (element element : script) {     matcher m = p.matcher(element.data());     if (m.find()){         url = m.group(1);     } } system.out.println(url); 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -