[Wellington-pm] Problems with HTTPS through LWP.
Grant McLean
grant at mclean.net.nz
Mon Jun 19 19:55:32 PDT 2006
On Tue, 2006-06-20 at 14:40 +1200, michael at diaspora.gen.nz wrote:
> >Interestingly, the code snippet in the synopsis of the Net::SSLeay
> >documentation does seem to work:
>
> Irritating, on the other hand, is that the following program works:
>
> #!/usr/bin/python
> import urllib
> U = 'https://www.telstraclear.co.nz/usagemeter/index.cfm'
> print urllib.urlopen(U).read()
>
> Shorter than the Perl equivalent, even. Bah. Might have to use the
> Python mechanize library for this one.
The ruby version is pretty short too (and works)
#!/usr/bin/ruby
require 'open-uri'
url = 'https://www.telstraclear.co.nz/usagemeter/index.cfm'
puts open(url).read
But in both cases this is like comparing to LWP::Simple code in Perl
which would also be short (if non-functional).
Cheers
Grant
More information about the Wellington-pm
mailing list