Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- perl -e '
- > use XMLTV;
- > use LWP;
- > use Data::Dumper;
- > my $ua = LWP::UserAgent->new();
- > $ua->agent("xmltv/$XMLTV::VERSION");
- > $ua->env_proxy();
- > my $response = $ua->get("http://xmltv.se/countries.xml");
- > print "response is: " . Dumper($response)
- > '
- response is: $VAR1 = bless( {
- '_rc' => '200',
- '_headers' => bless( {
- 'accept-ranges' => 'bytes',
- 'last-modified' => 'Sat, 24 Mar 2018 16:33:45 GMT',
- 'client-response-num' => 1,
- '::std_case' => {
- 'client-response-num' => 'Client-Response-Num',
- 'cf-ray' => 'CF-RAY',
- 'client-date' => 'Client-Date',
- 'set-cookie' => 'Set-Cookie',
- 'client-peer' => 'Client-Peer'
- },
- 'server' => 'cloudflare',
- 'set-cookie' => '__cfduid=d9f1f42d5f2ccdca7e365e46c78892b541530626115; expires=Wed, 03-Jul-19 13:55:15 GMT; path=/; domain=.xmltv.se; HttpOnly',
- 'client-peer' => '104.31.94.173:80',
- 'connection' => 'close',
- 'etag' => '"5ab67de9-326"',
- 'date' => 'Tue, 03 Jul 2018 13:55:15 GMT',
- 'client-date' => 'Tue, 03 Jul 2018 13:55:15 GMT',
- 'cf-ray' => '4349d945e7486b73-LHR',
- 'content-type' => 'text/xml',
- 'content-length' => '806'
- }, 'HTTP::Headers' ),
- '_msg' => 'OK',
- '_request' => bless( {
- '_uri_canonical' => bless( do{\(my $o = 'http://xmltv.se/countries.xml')}, 'URI::http' ),
- '_content' => '',
- '_uri' => $VAR1->{'_request'}{'_uri_canonical'},
- '_headers' => bless( {
- 'user-agent' => 'xmltv/0.5.67'
- }, 'HTTP::Headers' ),
- '_method' => 'GET'
- }, 'HTTP::Request' ),
- '_content' => '<?xml version="1.0" encoding="UTF-8"?>
- <tv generator-info-name="manual">
- <country id="Austria">Austria</country>
- <country id="Croatia">Croatia</country>
- <country id="Denmark">Denmark</country>
- <country id="Estonia">Estonia</country>
- <country id="Finland">Finland</country>
- <country id="Germany">Germany</country>
- <country id="Hungary">Hungary</country>
- <country id="Latvia">Latvia</country>
- <country id="Lithuania">Lithuania</country>
- <country id="Netherlands">Netherlands</country>
- <country id="Norway">Norway</country>
- <country id="Poland">Poland</country>
- <country id="Sweden">Sweden</country>
- <country id="Switzerland">Switzerland</country>
- <country id="RADIO">All Radio stations</country>
- <country id="TV">All TV Channels</country>
- </tv>',
- '_protocol' => 'HTTP/1.1'
- }, 'HTTP::Response' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement