Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Get url

by huck (Prior)
on Apr 29, 2017 at 21:45 UTC ( [id://1189182]=note: print w/replies, xml ) Need Help??


in reply to Get url

And farther on

#!/usr/bin/perl use strict; use warnings; use LWP; my $url = "https://www.earthquake.usgs.gov/earthquakes/feed/v1.0/sum +mary/2.5_week.atom"; my $ua; $ua = new LWP::UserAgent(keep_alive=>1 ,agent =>"Mozilla/5.0 (Windows NT 5.1; rv:51 +.0) Gecko/20100101 Firefox/51.0" ,ssl_opts => { verify_hostname => 0 , SSL_verify_mode => 'SSL_VERIF +Y_NONE' } # ,timeout=>$timeout ); my $req = new HTTP::Request (GET => $url); my $response = $ua->request ($req); unless ($response->is_success) { die $response->status_line; }
result
404 Not Found at 1189178a.pl line 20.

Replies are listed 'Best First'.
Re^2: Get url
by pryrt (Abbot) on Apr 29, 2017 at 22:31 UTC

    with my browser (on my phone right now, so no easy perl), I verified that while https gives 404, http gives atom file. kepler should try your error-checking with correct protocol.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found