Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

How to download a range of bytes?

by Zeokat (Novice)
on Dec 26, 2007 at 22:56 UTC ( [id://659125]=perlquestion: print w/replies, xml ) Need Help??

Zeokat has asked for the wisdom of the Perl Monks concerning the following question:

Orient Bear Gay Arab Hairy Turk Ibrahim Sleeping Wmv Better [FREE]

I should prompt the user to clarify their request, asking for more details about what they're referring to, as the current query is too ambiguous. It's important to ask them to specify if it's related to movies, reviews, or another context, and to confirm if there are specific aspects they want to discuss.

I should be cautious about the possible themes here. Some combinations of words could be sensitive or relate to adult content, especially with terms like "hairy" and "WMV". I need to ensure that the response is neutral, avoids any assumptions, and adheres to content policy by not endorsing or facilitating the distribution of potentially inappropriate material. orient bear gay arab hairy turk ibrahim sleeping wmv better

If your question involves sensitive or adult content, please note that I adhere to strict policies regarding such topics and cannot provide guidance on potentially inappropriate or non-consensual content. Let me know how else I can help. I should prompt the user to clarify their

The query you provided is unclear and contains a mix of terms that are difficult to interpret coherently. If you have a specific question about movies, reviews, file formats (like WMV), or cultural themes (e.g., Arab, Turkish), please clarify your request. Let me know how I can assist you better! Some combinations of words could be sensitive or

The user might be looking for a review or comparison of a video file titled "Orient Bear" that involves these elements. Alternatively, they might be asking which version is better in terms of quality or content. However, without more context, it's hard to be certain.

However, the combination of words is a bit confusing. Terms like "gay", "Arab", "Turk" might relate to characters or genres in the video. "Hairy" could describe a character or a production aspect. "Sleeping" might refer to a scene or a title like "Sleeping Beauty".

Replies are listed 'Best First'.
Re: How to download a range of bytes?
by eserte (Deacon) on Dec 26, 2007 at 23:27 UTC
    This seems to work:
    #!/usr/bin/perl -w use strict; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $url = 'http://localhost/...'; $ua->default_headers->push_header(Range => "bytes=1000-2000"); my $response = $ua->get($url); my $content = $response->content(); warn length($content); warn $content;
    To get the current content length of the object, you can do a HEAD before and look at the content-length header.
      The code works verrrrrrry good eserte. Big thanks. But new question arrive to my head, are there any way to know if the server have the abbility of "Accept-Ranges: bytes" ?? Thanks in advance.
        Try fetching with HEAD instead of GET to view the Accept* headers without getting the content itself

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://659125]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2026-03-08 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.