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:

Young Sheldon S01e07 240p |verified| -

As Sheldon analyzes the social cues and tries to figure out the 'rules' of this new situation, his family members find themselves caught up in his obsessive quest for understanding. Meanwhile, Missy tries to get Sheldon to join her in teasing Georgie, but Sheldon remains fixated on deciphering the 'milk and cookies' enigma.

Meanwhile, the episode gives us some of the best Annie Potts material of the season. After developing a cough, Meemaw decides to quit smoking, leading her to acquire a Glock from a pawn shop for protection. This subplot is pure gold. It highlights the rougher, more chaotic edge of East Texas life that the The Big Bang Theory could only hint at. The visual of Meemaw—cigarette in one hand, pistol in the other—encapsulates her character perfectly: a woman who will bake you cookies but is also ready to hold her own in a crisis. young sheldon s01e07 240p

: George attempts to sneak into Meemaw’s house to steal the recipe while she is at a church picnic, only to discover she has never actually written it down. As Sheldon analyzes the social cues and tries

Here’s a social media post tailored for a nostalgic or retro-tech vibe, since you mentioned : After developing a cough, Meemaw decides to quit

#YoungSheldon #240p #NostalgiaTech #LowResHighFeels #SheldonCooper #OldInternet #PotatoQuality

: Fearing the escalating tension might lead to a divorce, Sheldon, Missy, and Georgie team up to end the feud.

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.