[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Offtopic]: Compress Downloads on the fly



Hi David,

On Saturday 28 January 2017 14:02:16 David Wright wrote:
> On Sat 28 Jan 2017 at 20:24:39 (+0100), Michael Luecke wrote:
> > On 01/28/2017 08:10 PM, Rainer Dorsch wrote:
> > >I would like to download a large csv file from a JavaScript intensive web page. My client system has not enough storage for the file, but if I could compress the file on the fly, things would work, since the file has a huge compression ratio.
> > 
> > If you could fetch the URL, then use wget or curl to do this:
> > 
> > wget -O- http://www.example.com | bzip2 >your.file.bz2
> > curl http://www.example.com | bzip2 >your.file.bz2
> 
> Yes, that's very straightforward. However, the problem often
> arises that wget (at least) can't download a file that the
> browser can. I suspect the phrase "JavaScript intensive web page"
> is meant to convey that situation. So further advice would
> be welcome.
> 

yes, you exactly got my point.

When I copy the download link from firefox, I get:

rd@mohot:~/Downloads$ curl 'http://192.168.0.52/download?action=dl&fmt=csv&start=2016.1.24%200:0:0.0&end=2017.1.25%2022:22:8.575'
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 405 HTTP method GET is not supported by this URL</title>
</head>
<body><h2>HTTP ERROR 405</h2>
<p>Problem accessing /download. Reason:
<pre>    HTTP method GET is not supported by this URL</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                

</body>
</html>
rd@mohot:~/Downloads$ 

Kind regards
Rainer


-- 
Rainer Dorsch
http://bokomoko.de/


Reply to: