从网址上的播放器获取视频源网址

时间:2017-03-25 13:02:08

标签: php python curl video

我正在尝试从以下网址获取视频源网址:

http://www.streamuj.tv/video/4a95f29bafc661c688a6?remote=1

我想得到这个网址: http://s2.streamuj.tv:8080/vid/01c5cbf5cb2893dcba25518aa7fd84b2/58d669ce/4a95f29bafc661c688a6_sd.flv?start=0

A试图使用CURL,但它还没有帮助。 这是我的CURL代码:

<?php
session_start();
include "simple_html_dom.php";

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.streamuj.tv/video/4a95f29bafc661c688a6?streamuj=original&authorize=ac13bb77d3d863ca362315b9b4dcdf3e');
curl_setopt($curl, CURLOPT_FILETIME, true);
curl_setopt($curl, CURLOPT_NOBODY, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($curl, CURLOPT_PROXY, "189.3.93.114:8080");
curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'user-agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2950.0 Iron Safari/537.36' ));
$header = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl); 

echo $info['url']; 
// print "http://www.streamuj.tv/video/4a95f29bafc661c688a6?streamuj=original&authorize=ac13bb77d3d863ca362315b9b4dcdf3e"

?>

使用PHP或Python的任何解决方案?谢谢!

0 个答案:

没有答案