Re: [Bulk] Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Mike Blezien
On 5/27/2015 7:46 AM, Lawrence Statton wrote: On 05/27/2015 07:33 AM, Mike Blezien wrote: *CONNECTED(0003) --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has re

Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Lawrence Statton
On 05/27/2015 07:33 AM, Mike Blezien wrote: *CONNECTED(0003) --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 0 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion:

Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Mike Blezien
On 5/25/2015 12:31 PM, Lawrence Statton wrote: I sent this to the list, but it seems to have gotten clogged in the tubes ... here's another copy Forwarded Message Subject: Re: LWP/Protocol E

Re: LWP/Protocol Errors

2015-05-26 Thread Lawrence Statton
platform (but I can't remember which now) when LWP was compiled to use openssl, the builder elected not to have ANY default CA path. This will require you to explicitly set the PERL_LWP_SSL_CA_PATH environment variable (or the 'all-in-one file variant'- read perldoc LWP ) to poi

Re: LWP/Protocol Errors

2015-05-26 Thread Lawrence Statton
On 05/25/2015 12:02 PM, Mike Blezien wrote: Hello, I recently setup a Paypal IPN script which worked fine for some time now but now all of a sudden I keep getting these error message: * **Can't connect to www.paypal.com:443 (certificate verify failed)** **LWP::Protocol::https::Socket

Re: LWP/Protocol Errors

2015-05-25 Thread Mike Blezien
port 443 is being block or not open due a firewall on the server? Another tidbit of information that just burbled to the top of my brain.  On SOME platform (but I can't remember which now) when LWP was compiled to use openssl

LWP/Protocol Errors

2015-05-25 Thread Mike Blezien
Hello, I recently setup a Paypal IPN script which worked fine for some time now but now all of a sudden I keep getting these error message: Can't connect to www.paypal.com:443 (certificate verify failed) LWP::Protocol::

Re: How to parse XML content using lwp agent or XML Smart

2014-08-25 Thread angus
. #!/opt/csw/bin/perl use strict; use warnings; use LWP; use XML::Smart; use CGI; my $ua = LWP::UserAgent->new; my $q = new CGI; my $doc = XML::Smart->new(); $doc->{PHC_LOGIN}{USERID} = ‘john.doe'; $doc->{PHC_LOGIN}{USERID}->set_node(1); $doc->{PHC_LOGIN}{USERPASSWORD

Re: How to parse XML content using lwp agent or XML Smart

2014-08-22 Thread Rob Dixon
On 22/08/2014 11:27, angus wrote: > Hi, > > Hi, > > I have some sample code that posts some XML content to an URL using > LWP agent and XML Smart. The response to this comes back as some > custom XML. I now need to try and parse the response and find the > REDIRECTUR

How to parse XML content using lwp agent or XML Smart

2014-08-22 Thread angus
Hi, Hi, I have some sample code that posts some XML content to an URL using LWP agent and XML Smart. The response to this comes back as some custom XML. I now need to try and parse the response and find the REDIRECTURL value and redirect the client to that destination. I am having issues

Re: LWP/UserAgent fail authentication:

2014-08-01 Thread mimic...@gmail.com
Hi David The LWP::UserAgent docs isn't clear on how it handles the password. Thanks to your input, it's now clear why GitHub auth was failing. As you have noted, "$token:x-oauth-basic" doesn't work. # Basic authorization user name can't contain ':' at /usr

Re: LWP/UserAgent fail authentication:

2014-07-31 Thread David Precious
On Thu, 31 Jul 2014 17:01:38 +0100 "mimic...@gmail.com" wrote: > I receive error when calling GitHub API from Perl (LWP). Basically, > the problemis authentication failure, although the username and > password combination is valid. > > In the code snippet below, I have

LWP/UserAgent fail authentication:

2014-07-31 Thread mimic...@gmail.com
Hi I receive error when calling GitHub API from Perl (LWP). Basically, the problemis authentication failure, although the username and password combination is valid. In the code snippet below, I have tried changing the values passed to credentials() in several ways, however it does not work

Re: url_encode for LWP POST

2013-07-25 Thread Feng He
Now I got it, from lwpcook it's this way: Lazy people use the HTTP::Request::Common module to set up a suitable POST request message (it handles all the escaping issues) and has a suitable default for the content_type: use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua

Re: url_encode for LWP POST

2013-07-25 Thread Feng He
Do you mean HTTP::Request::Common will do the url_encode stuff automatically? Thanks Charles. On 2013-7-25 18:30, Charles DeRykus wrote: On 7/25/2013 12:57 AM, Feng He wrote: Would LWP::UserAgent call the url_encode() method from URL::Encode automatically for the posted content? use LWP

Re: url_encode for LWP POST

2013-07-25 Thread Charles DeRykus
On 7/25/2013 12:57 AM, Feng He wrote: Would LWP::UserAgent call the url_encode() method from URL::Encode automatically for the posted content? use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new( POST => 'http://rt.cpan.org/Public/Dis

url_encode for LWP POST

2013-07-25 Thread Feng He
Hi Would LWP::UserAgent call the url_encode() method from URL::Encode automatically for the posted content? use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new( POST => 'http://rt.cpan.org/Public/Dist/Display.html'); $req->conte

Re: LWP::UserAgent 501 Not Implemented only for https?? [firefox works fine]

2011-10-20 Thread Rajeev Prasad
Hi Gustavo, I tried both, still getting same error. tx. Rajeev From: Gustavo Telly To: Rajeev Prasad Cc: perl list Sent: Thursday, October 20, 2011 11:45 AM Subject: Re: LWP::UserAgent 501 Not Implemented only for https?? [firefox works fine] Hello

Re: LWP::UserAgent 501 Not Implemented only for https?? [firefox works fine]

2011-10-20 Thread Gustavo Telly
Crypt::SSLeay installed. > > > > #!/usr/bin/perl > use strict; > use warnings; > use LWP::UserAgent; > > my $ua = LWP::UserAgent->new; > $ua->proxy(['https', 'http', 'ftp'], 'http://myproxy.net:8080/'); > $ua->ag

Re: LWP::UserAgent 501 Not Implemented only for https?? [firefox works fine]

2011-10-20 Thread Rajeev Prasad
proxy does not require username/password authentication. I do have Crypt::SSLeay installed. #!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->proxy(['https', 'http', 'ftp'], 'http://myproxy.net:8080/'

LWP::UserAgent 501 Not Implemented only for https?? [firefox works fine]

2011-10-19 Thread Rajeev Prasad
ot require username/password authentication. I do have Crypt::SSLeay installed. #!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->proxy(['https', 'http', 'ftp'], 'http://myproxy.net:8080/'); $ua

Re: Moving through tree's using LWP

2011-01-13 Thread Brandon McCaig
On Wed, Jan 12, 2011 at 11:03 AM, Jim Gibson wrote: > Methods and subroutines are not called ("interpolated") within double > quotes. Unless you choose to be dirty and "trick"[1] Perl into doing it anyway: print "@{[ $child->Tag() ]}\n"; Thanks to array dereferencing (i.e., @{} ) an anonymous a

Re: Moving through tree's using LWP

2011-01-12 Thread Rob Dixon
On 12/01/2011 16:03, Jim Gibson wrote: At 11:05 PM +1100 1/12/11, Sean Murphy wrote: Hi All. I have read the page and the O'rielly book on PWL. I must be thick or something. but when I dump the content of the web page into the treeBuilder via a scaler. Then I try and print the tag. I get: HTML

Re: Moving through tree's using LWP

2011-01-12 Thread Jim Gibson
At 11:05 PM +1100 1/12/11, Sean Murphy wrote: Hi All. I have read the page and the O'rielly book on PWL. I must be thick or something. but when I dump the content of the web page into the treeBuilder via a scaler. Then I try and print the tag. I get: HTML::Element=HASH(0x41b1074)->Tag ( ) B

Re: Moving through tree's using LWP

2011-01-12 Thread Sean Murphy
"; } } return; } I can get the text. But not the name of the Tag or Attributes. I am starting at the top of the tree. The sub routine naming is screwed because I have done so much playing around and haven't fixed things up. So whatam I doing wrong? Sean Message - From: &

Re: Moving through tree's using LWP

2011-01-12 Thread John Delacour
At 12:52 +0200 12/01/2011, Shlomi Fish wrote: http://search.cpan.org/~jfearn/HTML- Tree-4.1/lib/HTML/Element.pm#$h-%3Etag%28%29_or_$h-%3Etag%28%27tagname%27%29 (sorry for the broken link). Links won't break in proper mailers if you enclose them in <>

Re: Moving through tree's using LWP

2011-01-12 Thread Shlomi Fish
Hi Sean, On Wednesday 12 Jan 2011 12:43:24 Sean Murphy wrote: > Hi all. > > I posted previously on how to move in a tree by a node at a time by using > HTML:TreeBuilder which is used with LWP. > > I wish to move by a single node and get the following info: > > tag of

Moving through tree's using LWP

2011-01-12 Thread Sean Murphy
Hi all. I posted previously on how to move in a tree by a node at a time by using HTML:TreeBuilder which is used with LWP. I wish to move by a single node and get the following info: tag of the current HTML element. Text of the HTML element. Attributes of the current HTML element. Of course

Re: LWP::Simple::head($url) -- Return value

2010-10-31 Thread Shawn H Corey
On 10-10-31 07:52 AM, Jatin wrote: 1. From the module's documentation i can understand that the return value of the head() method in a scalar context is TRUE , but what does the value returned by the server which is HTTP::Response=HASH(0x861cd00) signify ? It is a hash reference. See `perldoc

LWP::Simple::head($url) -- Return value

2010-10-31 Thread Jatin
Hi All I had the following code to test what the head() method of the LWP::Simple module returns. #!/usr/bin/perl use warnings; use strict; use LWP::Simple; my $url = 'http://oreilly.com/store/complete.html'; #my $url = 'http://www.garimela.com/complete.html'; my

Re: Mailing list for LWP

2010-10-27 Thread Jatin
Thanks Brian. Thanks Jatin On Wednesday 27 October 2010 10:57 PM, Brian Fraser wrote: http://search.cpan.org/~gaas/libwww-perl-5.837/lib/LWP.pm Apparently so; See the last line : ) Brian. -- To unsubscribe, e-mail: beginners-unsu

Re: a Loop constructing the URLs to use LWP::UserAgent repeatedly up to 10 thousand times

2010-10-24 Thread Randal L. Schwartz
>>>>> ""jobst" == "jobst müller" writes: "jobst> I am trying to use LWP::UserAgent on the same URLs see below with different query arguments, and i am wondering if LWP::UserAgent provides a way for us to loop through the query arguments? Why ar

Re: a Loop constructing the URLs to use LWP::UserAgent repeatedly up to 10 thousand times

2010-10-23 Thread Shlomi Fish
Hi jobst, On Saturday 23 October 2010 07:16:04 jobst müller wrote: > Hello dear list good morning > Please don't start a new thread by replying to an existing message (you also CCed the previous correspondents.) Instead send a new message to beginn...@perl.org. > I am try

a Loop constructing the URLs to use LWP::UserAgent repeatedly up to 10 thousand times

2010-10-22 Thread jobst müller
Hello dear list good morning I am trying to use LWP::UserAgent on the same URLs see below with different query arguments, and i am wondering if LWP::UserAgent provides a way for us to loop through the query arguments? I am not sure that LWP::UserAgent has a method for us to do that. I tried

Re: Perl LWP::Simple

2010-05-04 Thread Shawn H Corey
Tony Esposito wrote: Bravo! I am in ... but I need to traverse many links over multiple pages to get to the one that points to the file I want to download. Would follow_link() be the answer? Yes, but it's up to you to figure out how to navigate them. :) -- Just my 0.0002 million dolla

Re: Perl LWP::Simple

2010-05-04 Thread C.DeRykus
On May 4, 9:46 am, tony1234567...@yahoo.co.uk (Tony Esposito) wrote: > Cheers! > > New to LWP and downloading file/copying file from Web to local box.  Had a go > at it and failed horribly...  On Solaris 10 with Perl 5.10. > #!/usr/bin/perl -w > use strict; > use LWP::Sim

Re: Perl LWP::Simple

2010-05-04 Thread Tony Esposito
, 2010 11:59:53 Subject: Re: Perl LWP::Simple Tony Esposito wrote: > Cheers! > > New to LWP and downloading file/copying file from Web to local box.  Had a go > at it and failed horribly...  On Solaris 10 with Perl 5.10. > #!/usr/bin/perl -w > use strict; > use LWP::Sim

Re: Perl LWP::Simple

2010-05-04 Thread Shawn H Corey
Tony Esposito wrote: Cheers! New to LWP and downloading file/copying file from Web to local box. Had a go at it and failed horribly... On Solaris 10 with Perl 5.10. #!/usr/bin/perl -w use strict; use LWP::Simple qw($ua get); my $webpage ="https://www.mywebpage.com/Documents.zip&q

Perl LWP::Simple

2010-05-04 Thread Tony Esposito
Cheers! New to LWP and downloading file/copying file from Web to local box.  Had a go at it and failed horribly...  On Solaris 10 with Perl 5.10. #!/usr/bin/perl -w use strict; use LWP::Simple qw($ua get); my $webpage ="https://www.mywebpage.com/Documents.zip";; $ua->timeout(20)

Solved: First LWP::UserAgent and HTML::Form app.

2010-03-30 Thread Gary Stainburn
Sod's law folks. Posted the question then reviewed what I'd done and found the problem. Mixing three examples gave me the wrong code. Lifted the line straight from the HTML::Form perldoc and it worked. $req=$ua->request($form->click); Gary On Tuesday 30 March 2010 09:41:54 Gary Stainburn wro

First LWP::UserAgent and HTML::Form app.

2010-03-30 Thread Gary Stainburn
Hi folks, I'm trying to write my first proper app using the above modules but following the perldocs/cookbooks I've come to a quick dead stop. According to the perldoc $form->click should generate an object I can pass straight to $ua->post, but when I try that I get the following: Code snippet

Re: LWP error returned

2010-02-10 Thread Dermot
On 10 February 2010 17:01, Mike Blezien wrote: > > - Original Message - From: "Dermot" > To: "Perl List" > Sent: Wednesday, February 10, 2010 10:14 AM > Subject: Re: LWP error returned > > > On 10 February 2010 15:47, Mike Blezien wrote: >

Re: LWP error returned

2010-02-10 Thread Mike Blezien
- Original Message - From: "Dermot" To: "Perl List" Sent: Wednesday, February 10, 2010 10:14 AM Subject: Re: LWP error returned On 10 February 2010 15:47, Mike Blezien wrote: Hello, I've run into an error while using the LWP module which I haven'

Re: LWP error returned

2010-02-10 Thread Dermot
On 10 February 2010 15:47, Mike Blezien wrote: > Hello, > > I've run into an error while using the LWP module which I haven't come > accross before and was wondering what is means. This is

LWP error returned

2010-02-10 Thread Mike Blezien
Hello, I've run into an error while using the LWP module which I haven't come accross before and was wondering what is means. This is the coding I'm using: ------ use LWP:

Re: UTF-8 problem with LWP

2010-01-14 Thread Shawn H Corey
Christoph Friedrich wrote: > Shawn H Corey schrieb: >> Have you tried: >> >> use utf8; >> >> >> > I have tried it - did not success... OK, how about: binmode STDOUT, ':encoding(utf8)'; You might want to do it to STDERR too. If that doesn't work, then I'm out of suggestions. :( -- Just my

Re: UTF-8 problem with LWP

2010-01-14 Thread Christoph Friedrich
Shawn H Corey schrieb: Have you tried: use utf8; I have tried it - did not success... -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: UTF-8 problem with LWP

2010-01-14 Thread Shawn H Corey
Have you tried: use utf8; -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org Fo

UTF-8 problem with LWP

2010-01-13 Thread Christoph Friedrich
Hello there, I try to fetch the content of the page http://www.pluendermeister.de/sec/300300/?curServer=Aegwynn&gname=&submit=Daten+absenden with LWP and try to parse it. But when I print the result of my parsing it is not readable. Here is the result I get: "teh D\

lwp content encoding

2009-07-27 Thread Roman Makurin
I have a problem with lwp. When I retrive pages i use decode_content to access html. Which encoding has the result of decoed_content ? my $ua = LWP::UserAgent; my $resp = $ua->get("http://some.url";); die $resp->status_line, $/ unless $resp->is_success; Im using HTML::TreeBu

Re: Help with LWP

2009-05-13 Thread ANJAN PURKAYASTHA
Yes tried the URL; http://www.ncbi.nlm.nih.gov/coreutils/dispatch.cgi. Got a "302 Found at lwp_test.pl line 23" error message. Thanks Anjan On Wed, May 13, 2009 at 5:57 PM, Dermot wrote: > 2009/5/13 Jim Gibson : > > On 5/13/09 Wed May 13, 2009 2:17 PM, "ANJAN PURKAYASTHA" > > scribbled: > > >

Re: Help with LWP

2009-05-13 Thread Dermot
2009/5/13 Jim Gibson : > On 5/13/09 Wed  May 13, 2009  2:17 PM, "ANJAN PURKAYASTHA" > scribbled: > >> Hi, >> >> if ($response->is_success) { >>      print $response->content()."\n";  # or whatever >>  } >>  else { >>      die $response->status_line; >>  } >> >> All this script returns is the NCBI

Re: Help with LWP

2009-05-13 Thread Jim Gibson
On 5/13/09 Wed May 13, 2009 2:17 PM, "ANJAN PURKAYASTHA" scribbled: > Hi, > Here is a beginner's LWP code that is not working. The script is supposed to > query the NCBI website with a user defined term: tuberculosis. The term is > entered into a search box. The use

Re: Help with LWP

2009-05-13 Thread Gunnar Hjalmarsson
ANJAN PURKAYASTHA wrote: Hi, Here is a beginner's LWP code that is not working. The script is supposed to query the NCBI website with a user defined term: tuberculosis. The term is entered into a search box. The user chooses a database from a drop-down menu and then hits the Search button.

Help with LWP

2009-05-13 Thread ANJAN PURKAYASTHA
Hi, Here is a beginner's LWP code that is not working. The script is supposed to query the NCBI website with a user defined term: tuberculosis. The term is entered into a search box. The user chooses a database from a drop-down menu and then hits the Search button. Here is the code: #!/us

Re: LWP Select Options Count

2009-05-12 Thread Gunnar Hjalmarsson
Bobby wrote: I'm trying to use LWP to scape a website's content and count the number of options in a select dropdown box and ran into a bit of a stubling block. Below is the code I have so far but it's not getting the desired results for me, could someone help me look through th

LWP Select Options Count

2009-05-12 Thread Bobby
Hi, I'm trying to use LWP to scape a website's content and count the number of options in a select dropdown box and ran into a bit of a stubling block.  Below is the code I have so far but it's not getting the desired results for me, could someone help me look through the code a

Re: LWP

2009-04-08 Thread John W. Krahn
ANJAN PURKAYASTHA wrote: I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? Have you read the LWP cookbook? perldoc lwpcook John -- Those people who think they know everything are a great

Re: LWP

2009-04-08 Thread Telemachus
On Wed Apr 08 2009 @ 10:29, Gunnar Hjalmarsson wrote: > Telemachus wrote: >> On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: >>> I have a file stored at a location: http://parent_dir/file >>> Which among gazillion LWP options can I use to download and store

Re: LWP

2009-04-08 Thread ANJAN PURKAYASTHA
e >>> Which among gazillion LWP options can I use to download and store the >>> file >>> on my machine? >>> >> >> If you just want to grab the file, you can use LWP::Simple to grab it: >> >> use LWP::Simple; >> >> my $url =

Re: LWP

2009-04-08 Thread Gunnar Hjalmarsson
Telemachus wrote: On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? If you just want to grab the file, you can use LWP::Simple to grab it

Re: LWP

2009-04-08 Thread Gunnar Hjalmarsson
ANJAN PURKAYASTHA wrote: I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? use LWP::Simple; getstore('http://parent_dir/file', 'file'); -- Gunnar Hja

Re: LWP

2009-04-08 Thread Telemachus
On Wed Apr 08 2009 @ 3:22, ANJAN PURKAYASTHA wrote: > I have a file stored at a location: http://parent_dir/file > Which among gazillion LWP options can I use to download and store the file > on my machine? > TIA > Anjan If you just want to grab the file, you can use LWP::Si

LWP

2009-04-08 Thread ANJAN PURKAYASTHA
I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? TIA Anjan -- = anjan purkayastha, phd bioinformatics analyst whitehead institute for biomedical research nine

Re: LWP - HTTP::Request::Common construction

2009-03-19 Thread Dermot
gt; > > Here my code fragment: > > use  'Carp'; > BEGIN { use_ok( 'LWP::UserAgent' ); } > BEGIN { use_ok( 'HTTP::Request::Common' ); } > ... > >  $url .= '/cgi-bin/uploadPDF.pl'; > >  my $req = HTTP::Request->new(POST $ur

LWP - HTTP::Request::Common construction

2009-03-19 Thread Dermot
Hi, I can't see what I am doing wrong when I construct a request with HTTP::Request::Common. I am trying to use the Form-based File-Upload feature as described at http://search.cpan.org/~gaas/libwww-perl-5.825/lib/HTTP/Request/Common.pm Here my code fragment: use 'Carp'; BEGIN

Re: What SSL version does LWP use?

2009-02-18 Thread Jim Gibson
On 2/18/09 Wed Feb 18, 2009 12:06 PM, "David Shere" scribbled: > Either I'm blind or the LWP package documentation at > http://search.cpan.org/~gaas/libwww-perl-5.825/lib/LWP.pm doesn't say > what SSL standard it uses, or if it can use more than one. > > I r

What SSL version does LWP use?

2009-02-18 Thread David Shere
Either I'm blind or the LWP package documentation at http://search.cpan.org/~gaas/libwww-perl-5.825/lib/LWP.pm doesn't say what SSL standard it uses, or if it can use more than one. I recently received notice that I must "update any applications or integrations that may be us

Re: LWP getting special (multibyte) characters from webpages

2009-01-09 Thread John Refior
> $response->content gives you the exact byte values returned by > the server; decoded_content turns it into Perl's internal Unicode > representation (assuming the server is telling the truth about what > encoding the page is in). Thanks for the clarification, as I wasn't sure of the difference be

Re: LWP getting special (multibyte) characters from webpages

2009-01-02 Thread Mark Wagner
On Fri, Dec 26, 2008 at 12:03, John Refior wrote: > Hello, > > I am writing Perl scripts that go to webpages, download certain content, > and then create a CSV file with the relevant data. I am trying to be a > friendly web robot, so I am using the LWP::RobotUA module.

Re: LWP getting special (multibyte) characters from webpages

2008-12-26 Thread John Refior
y in Microsoft Excel on a Windows box. Incidentally, I still get a warning with -w: Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/share/perl5/LWP/Protocol.pm line 114. I am using Perl 5.8.8 on linux. I might be doing something wrong, or perhaps upgrading to Perl

Re: LWP getting special (multibyte) characters from webpages

2008-12-26 Thread Chas. Owens
On Fri, Dec 26, 2008 at 15:03, John Refior wrote: snip > The problem I am having is that a number of these webpages have special > multibyte characters on them, such as the trademark symbol and registered > trademark symbol. For example, in the CSV, the trademark (TM) symbol > shows up like > >

LWP getting special (multibyte) characters from webpages

2008-12-26 Thread John Refior
Hello, I am writing Perl scripts that go to webpages, download certain content, and then create a CSV file with the relevant data. I am trying to be a friendly web robot, so I am using the LWP::RobotUA module. my $ua = LWP::RobotUA->new('product_name', 'my_email')

LWP::Useragent htaccess does not work

2008-10-29 Thread OXx
Hello all, I try to make a script to download a file with htaccess. I have the error 401, it does not work. Why my script do not use my credentials? #!/usr/bin/perl use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->credentials( '192.168.0.200:443', 'weba'

Re: LWP::Simple

2008-10-28 Thread John W. Krahn
there is "nothing" in the hash called %links? Here is the code: #!/usr/bin/perl -wT use warnings; use strict; use LWP::Simple; require HTML::Parser; require HTML::LinkExtor; $Domain = "mysite.com"; $URL = get("http://www.site.com";); mkdir "$Domain";

LWP::Simple

2008-10-28 Thread [EMAIL PROTECTED]
ot; in the hash called %links? Here is the code: #!/usr/bin/perl -wT use LWP::Simple; require HTML::Parser; require HTML::LinkExtor; $Domain = "mysite.com"; $URL = get("http://www.site.com";); mkdir "$Domain"; $LinkExtor = HTML::LinkExtor->new(\&links);

Re: LWP / HTTP content

2008-10-06 Thread Dermot
2008/10/6 Dermot <[EMAIL PROTECTED]>: > Hi, > > use HTTP::Request::Common qw(POST); > > my $req = POST $url, [user => '[EMAIL PROTECTED]', passwd => > 'B3NzaC1yo7393Cbonx2a1xd562LiCjtYwU7LAb' , contrib => $code]; > That was wrong of me. I should have tested more before I hit send. Of course

LWP / HTTP content

2008-10-06 Thread Dermot
Hi, I am trying to configure a POST request using LWP to post the hash below. my %test = ( user=> '[EMAIL PROTECTED]', passwd => 'B3NzaC1yo7393Cbonx2a1xd562LiCjtYwU7LAb', contrib => $code, name

Re: LWP and authentication

2008-09-11 Thread ssinn
gt; > #!/usr/bin/perl -w > > > use strict; > > use warnings; > > useLWP; > > use URI; > > > # This authenticates > > my $browser =LWP::UserAgent->new; > > $browser->credentials( > >         'http://10.1.0.8:80', > >  

Re: LWP and authentication

2008-08-22 Thread Rob Dixon
ssinn wrote: > > I am currently writing a script that will connect to a URL, > authenticate itself and GET information to the site. > I am using this code out of the Perl & LWP book but it is failing. > > #!/usr/bin/perl -w > > use strict; > use warnings; &g

LWP and authentication

2008-08-22 Thread ssinn
I am currently writing a script that will connect to a URL, authenticate itself and GET information to the site. I am using this code out of the Perl & LWP book but it is failing. #!/usr/bin/perl -w use strict; use warnings; use LWP; use URI; # This authenticates my $browser = LWP::UserA

Re: the browser of LWP

2008-08-21 Thread Rob Dixon
Temple wrote: > > I have some experience with ruby watir > > (http://wtr.rubyforge.org/) > > I plan to try LWP of Perl. I bought this book > > http://oreilly.com/catalog/9780596001780/ > > Inside it are full of Mozilla and Internet explore. > > I dont know at

Re: the browser of LWP

2008-08-21 Thread Jim
AFAIK, LWP allows you to write web clients, for fetching data off the WWW. I think your browser choice is not relevent. Jim On Aug 20, 4:26 pm, [EMAIL PROTECTED] (Temple) wrote: > Hello Perl users, > I have some experience with ruby watir > (http://wtr.rubyforge.org/) > I plan to try

the browser of LWP

2008-08-21 Thread Temple
Hello Perl users, I have some experience with ruby watir (http://wtr.rubyforge.org/) I plan to try LWP of Perl. I bought this book http://oreilly.com/catalog/9780596001780/ Inside it are full of Mozilla and Internet explore. I dont know at what date firefox released but Is Firefox 3.0 applicable

Re: LWP module part of the standard distribution ?

2008-08-09 Thread Rob Dixon
Tobias Eichner wrote: > > I wonder if the LWP module is part of the standard distribution of Perl or > not? According the list provided by Module::CoreList it isn't (tested > versions 5.006, 5.008 and 5.010), but it seems that it is widely spread > nevertheless. > > Ca

Re: LWP module part of the standard distribution ?

2008-08-09 Thread Jeff Pang
Tobias Eichner 写道: > I wonder if the LWP module is part of the standard distribution of Perl or > not ? According the list provided by Module::CoreList it isn't (tested > versions 5.006, 5.008 and 5.010), but it seems that it is widely spread > nevertheless. > > Can I

LWP module part of the standard distribution ?

2008-08-09 Thread Tobias Eichner
I wonder if the LWP module is part of the standard distribution of Perl or not ? According the list provided by Module::CoreList it isn't (tested versions 5.006, 5.008 and 5.010), but it seems that it is widely spread nevertheless. Can I rely upon LWP.pm being available on all web server

Re: How do I use HTML::Stripper without lwp?

2008-07-31 Thread bdy
ely, this produces a blank text file. > > useLWP::Simple; > my $page_html = get('file://localhost/H:/test-r-get/google.html'); > > ;D > > Rob- Hide quoted text - > > - Show quoted text - Thanks; it works. Does the pod for LWP or HTML::Stripper contain anything about scrubbing HTML from all HTML files in a file directory? I couldn't find anything. Thanks, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Question about lwp-rget

2008-07-30 Thread Rob Dixon
bdy wrote: > > If I use lwp-rget to retrieve a Web site, will it retrieve new pages > added that may not be linked to? > > For example, the site www.123.com is composed of 10 pages, each of > which is accessible through links on the site. > > But, two pages are added i

Question about lwp-rget

2008-07-29 Thread bdy
If I use lwp-rget to retrieve a Web site, will it retrieve new pages added that may not be linked to? For example, the site www.123.com is composed of 10 pages, each of which is accessible through links on the site. But, two pages are added in the span of three days. www.123.com/fourteen

Re: How do I use HTML::Stripper without lwp?

2008-07-24 Thread Rob Dixon
bdy wrote: > > My code is as follows: > > use strict; use HTML::Stripper; use LWP::Simple qw( get ); my > $stripper = HTML::Stripper->new( skip_cdata => 1, strip_ws => 0 ); > my > $page_html = get(http://www.googl

Re: How do I use HTML::Stripper without lwp?

2008-07-24 Thread markrat
On Jul 24, 1:22 pm, [EMAIL PROTECTED] (Bdy) wrote: > My code is as follows: > > use strict; use HTML::Stripper; use LWP::Simple qw( get );      my > $stripper = HTML::Stripper->new(     skip_cdata => 1, strip_ws => 0  );       >  my > $page_html = get(http://www.google

How do I use HTML::Stripper without lwp?

2008-07-24 Thread bdy
My code is as follows: use strict; use HTML::Stripper; use LWP::Simple qw( get ); my $stripper = HTML::Stripper->new(skip_cdata => 1, strip_ws => 0 ); my $page_html = get(http://www.google.com/about.html); open(FILE, "> http___www.google.com.html");

RE: LWP

2008-07-18 Thread Thomas Bätzler
the result code 401 which prompts the browser to pop up the password window. "WWW-Authenticate:" defines the authentication type to use (Basic) and a realm to go with it. The idea is that the browser sends the same credentials to protected URLS at the same site that have the same realm. A

RE: LWP

2008-07-17 Thread Thomas Bätzler
[EMAIL PROTECTED] <[EMAIL PROTECTED]> asked: > Can someone assist me in modifying the the script below to support the > following: > > 1)define proxy server > 2)the URL being accessed via LWP is protected, so I need to > specify username/passwd combo This is OTT

LWP

2008-07-17 Thread wls . admin
Can someone assist me in modifying the the script below to support the following: 1)define proxy server 2)the URL being accessed via LWP is protected, so I need to specify username/passwd combo Thanks in advance, Script: #!/usr/local/bin/perl # script: webLazarus use LWP::Simple; use

Re: Why doesn't LWP get html file?

2008-06-27 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > $html has nothing from the following code. Could someone help me? > Thanks. Always use strict; use warnings; and declare all your variables with 'my'. That way you can fix many coding errors yourself without having to ask for help. > us

Re: Why doesn't LWP get html file?

2008-06-27 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: $html has nothing from the following code. Hard to tell what the problem is - the code works for me. Maybe you ought to try something simpler? #!/usr/bin/perl use strict; use warnings; use LWP::Simple; my $Surfurl = 'http://us.randstad.com/webapp/internet/se

Why doesn't LWP get html file?

2008-06-26 Thread trymelz
$html has nothing from the following code. Could someone help me? Thanks. use LWP; use URI; $Browser = LWP::UserAgent->new || die "$!"; my $Surfurl = 'http://us.randstad.com/webapp/internet/servlet/ BranchView?b=702'; my @ns_headers = ( 'User-Agent' =>

Re: regex on the fly on LWP

2008-06-13 Thread Rob Dixon
Pat Rice wrote: > hi all > I want to know if there is a way of puilling out line by line, a > www::Mechanize or LWP > > so at the moment I'm doing: > > > > > 1 #!/usr/bin/perl > 2 > 3 # Include the WWW::Mechanize module > 4 use W

  1   2   3   4   5   >