how do I download a link?
I can however download the link using my downloader utility and it contains the necessary rtmp parameter values, so my question is what is the best way to download that link using groovy?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>CastAMP.com</title>
<script type="text/javascript">
if(self==top) {
window.location = "about:blank";
}
</script>
<noscript><meta http-equiv="refresh" content="0; URL=about:blank"></noscript>
</head>
<body>
<div style="text-align:center;width:700px;">
<iframe src="468x60.php" id="header_iframe" frameborder='0' marginheight='0' marginwidth='0' scrolling='no' width='468' height='60'></iframe>
</div>
<div>
<div style="position:relative">
<div id="ad_overlay" style="width:700px;height:398px;position:absolute;top:0px;z-index:100;background-color:rgba(169, 152, 128, 0.4);display:none;">
<div id="ad_overlay_countdown" style="700px;position:absolute;top:20px;left:150px;text-align:center;color:#fff;font-size:11px">
This ad will close in <span id="countdownnum"></span> seconds. <a href="javascript:void(0)" onclick="removeOverlayHTML()"><img style="border:0;z-index:101;display:none" src="http://castamp.com/x.png" alt="x" id="xad" /></a></div>
<div id="ad_overlay_content" style="width:300px;height:250px;position:absolute;top:35px;left:150px;background:#fff;"></div>
</div>
<div id="ad_footer" style="width:700px;height:60px;position:absolute;top:270px;left:6px;background:url();display:none">
<div id="ad_footer_content" style="position:absolute;width:468px;height:60px;">
<iframe id='footer_iframe' frameborder='0' marginheight='0' marginwidth='0' scrolling='no' width='468' height='60'></iframe>
</div>
</div>
<script type="text/javascript" src="swfobject2.js"></script>
<div id="player">
<h2>Loading Player...</h2>
</div>
<script type='text/javascript'>
var so = new SWFObject('http://bitcast-r.v1.sjc1.bitgravity.com/malar/Players/player.swf','mpl','700','398','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
// so.addVariable('skin','http://live.castamp.com/fsjw43.xml');
so.addVariable('controlbar','over');
so.addVariable('backcolor','877c6b');
so.addVariable('dock','false');
so.addVariable('autostart','true');
so.addVariable('stretching','uniform');
so.addVariable('file', 'puurnld4');
so.addVariable('streamer', 'rtmp://stream.castamp.com:1935/amp');
//so.addVariable('bufferlength','3');
so.addVariable('rtmp.tunneling','false');
so.addVariable('logo.file', 'http://castamp.com/images/castamp.png');
so.addVariable('logo.hide','false');
so.addVariable('logo.position','top-right');
so.addVariable('logo.link','http://castamp.com/home.html');
so.addVariable('abouttext','CastAMP.com - Free Broadcasting');
so.addVariable('aboutlink','http://castamp.com/home.html');
so.write('player');
</script>
http:\\www.castamp.com/embed.php?c=puurnld4
CURL
----
GET /embed.php?c=puurnld4 HTTP/1.1
User-Agent: curl/7.23.1 (x86_64-pc-win32 libcurl/7.23.1 OpenSSL/0.9.8r zlib/1.2.5
Host: castamp.com
Accept: */*
Downloader
----------
GET /embed.php?c=ladytnb HTTP/1.1\r\n
Accept: */*\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)\r\n
Host: castamp.com\r\n
Connection: Keep-Alive\r\n
Cookie: __utma=109905047.1530474507.1329370460.1334327012.1334331785.9; __utmz=109905047.1329370460.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)\r\n
ContentURLContainer [fileType=VIDEO, contentUrl=rtmp://50.115.119.42/live/bonanza1.stream swfUrl=http://bitcast-r.v1.sjc1.bitgravity.com/malar/Players/player.swf pageURL=http://castamp.com/home.html playpath=bonanza1.stream, thumbnailUrl=https://sites.google.com/site/hahaflags/en.gif, live=true, expiresOn=Tue May 15 13:12:00 EDT 2012, expiresImmediately=true, cacheKey=http://www.hahasport.com/c-11.html?&estreams=4_http://www.hahasport.com/v-2/18/156/v-395700.html]
2012-04-15 12:47:00,137 DEBUG [WebResourceParser] Unexpected error during url extractor plugin invocation (HaHaSport) for item Sun 5:00-18:00 (Table 1)World Snooker Championship Qualifying-World Snooker: No signature of method: java.net.URL.newInputStream() is applicable for argument types: (java.util.LinkedHashMap) values: [[requestProperties:[Accept-Encoding:gzip,deflate]]]
Possible solutions: newInputStream(), withInputStream(groovy.lang.Closure)
Users browsing this forum: No registered users and 4 guests