Or you can be more ambitious and pass a :content_cb callback to the get method. This will give you the response in chunks and you can then accumulate them in a variable. When your analysis says that you have enough you can die to end the request, and catch that at a higher level with an eval. This will be a lot more complex, but avoids having to guess how much of the file to download.
In reply to Re^3: Download only part of a file from the web
by tilly
in thread Download only part of a file from the web
by funstence
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |