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
tried changing the values passed to > credentials() in several ways, however it does not work. [...] > my $auth_token = "username:token" [...] > my $ua = LWP::UserAgent->new; > $ua->agent('Mozilla/8.0'); > > #$ua->credentials("www.git

LWP/UserAgent fail authentication:

2014-07-31 Thread mimic...@gmail.com
. #!/usr/bin/perl use warnings; use strict; use LWP::Simple; use LWP::UserAgent; use HTTP::Request::Common qw(GET); my $url = shift; chomp $url; my $auth_token = "username:token" #my ($login, $pass) = split /:/, $auth_token; #print "\nDEBUG: $login\n\n"; my $ua = LWP::UserAg

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: 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
ing 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 to figure it out. And i dig

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

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

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: problems passing values to subroutine using LWP::Useragent

2007-08-23 Thread Tom Phoenix
On 8/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I've had some success passing various airport codes > to the other subroutines using functions like lwp::simple, but in this > one it's not working. Has anyone suggested using higher-level WWW::Mechanize instead of low-level LWP::Simple?

problems passing values to subroutine using LWP::Useragent

2007-08-23 Thread shadkeene
ring up the data for that airport...it returns nothing...no error message either. I'm fairly new to using lwp::useragent, so it may be that I'm using it as a subroutine incorrectly. Here's the code if you can lend some help...thanks! #!/perl/bin/perl -w use CGI qw(:standard);

LWP useragent and SSL

2007-05-09 Thread Tom Allison
I recently started using LWP::UserAgent to access some HTTPS sites and ran into a problem that doesn't easily present a solution. I have one site that I can connect to and use with great success using HTTPS. I have another where the site owner gave me a certificate on file to us

Re: What does "use vars '@ISA';@ISA = 'LWP::UserAgent';my $agent = __PACKAGE__->new;"

2005-05-02 Thread Chris Devers
On Mon, 2 May 2005, Siegfried Heintze wrote: > What the heck is going on here? I understand the "use" statements, but the > subsequent statements baffle me. It looks to me like the LWP::UserAgent module is being subclassed. The other way to do this would be to write

What does "use vars '@ISA';@ISA = 'LWP::UserAgent';my $agent = __PACKAGE__->new;"

2005-05-02 Thread Siegfried Heintze
on here? I understand the "use" statements, but the subsequent statements baffle me. Thanks, Siegfried use LWP; use PromptUtil; use HTTP::Cookies; use HTML::Parser; use URI; use vars '@ISA'; @ISA = 'LWP::UserAgent'; my $agent= __PACKAGE__->new;

LWP::UserAgent

2005-01-04 Thread Ing. Branislav Gerzo
Hi there, just pretty simple question: is LWP::UserAgent encode URL ? for example I have: my $ua = LWP::UserAgent->new; my $resp = $ua->get('http://something.net/this:is+just test'); my question is, if LWP first encode (escape) path in URL as is written in RFC 1738, or I have

Re: LWP::UserAgent establishing session CFM

2005-01-02 Thread Jenda Krynicky
error from the host. does anyone know how to establish this kind of > session? > > This is the script I have been hacking with - > > #! /usr/bin/perl -w > > use LWP::UserAgent; > > $ua1 = LWP::UserAgent->new(requests_redirectable => > ['POST&#x

LWP::UserAgent establishing session CFM

2004-12-23 Thread Earthlink-m_ryan
This is the script I have been hacking with - #! /usr/bin/perl -w use LWP::UserAgent; $ua1 = LWP::UserAgent->new(requests_redirectable => ['POST','GET','HEAD']); my $hdrs = HTTP::Headers->new(); my $req = HTTP::Request->new(POST

Re: LWP::UserAgent -> Not in this case?

2004-12-09 Thread diogo . senai
me... Thanks! #!/usr/bin/perl use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); $ua->cookie_jar({}); my $req = HTTP::Request->new(POST => 'http://www.tj.go.gov.br/online/Capital/Processos_SPG/Resp_Processo1.dml'); #my $req

Re: LWP::UserAgent -> Not in this case?

2004-12-09 Thread Jonathan Paton
Hi, I can only guess at the source of the problem. I think it is because that web site requires cookies. The solution is to have a cookie jar, like: my $agent = LWP::UserAgent->new(); $agent->cookie_jar({}); Jonathan Paton -- #!perl $J=' 'x25 ;for (qq< 1+10 9+14 5-10 50-

LWP::UserAgent -> Not in this case?

2004-12-09 Thread diogo . senai
Hi folks, I´m here again to once more ask for your help. As some of you know, I´m trying to create a script that automatically fills in a formfield and get the result of that search. It´s based on a code, for example: 9600352534 The link to the form is 'http://www.tj.go.gov.br/online/Inicial/Proce

LWP::UserAgent::FramesReady

2004-12-07 Thread diogo . senai
Hi you all, I'm trying to write a script that sends a code to a website, filling in a form-field, and get the result. Just using LWP module isn't possible, because this module doesn't support frames. So I found at cpan.org that LWP::UserAgent::FramesReady may help me, but I don&#

Re: Strange result from LWP::UserAgent, how to extract ?!

2004-08-15 Thread Bee
Thanks a lot, all are giving the answers that I want, thanks !!! - Original Message - From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 12:34 AM Subject: Re: Strange result from LWP::UserAgent, how to extract ?! &

Re: Strange result from LWP::UserAgent, how to extract ?!

2004-08-14 Thread Gunnar Hjalmarsson
Bee wrote: > I have the following code : > require LWP::UserAgent; > my $ua = new LWP::UserAgent; > my $result = $ua -> get('http://somewhere .com'); > > When I print $ua, I got :LWP::UserAgent=HASH(0x1a953c4) > When I print $result, I got HTTP::Resp

Strange result from LWP::UserAgent, how to extract ?!

2004-08-14 Thread Bee
I have the following code : require LWP::UserAgent; my $ua = new LWP::UserAgent; my $result = $ua -> get('http://somewhere .com'); When I print $ua, I got :LWP::UserAgent=HASH(0x1a953c4) When I print $result, I got HTTP::Response=LWP::UserAgent=HASH(0x1a953c4) What's that me

Re: LWP::UserAgent Question

2004-03-31 Thread Oliver Schnarchendorf
On Thu, 1 Apr 2004 09:49:20 +0700, Hari Fajri wrote: > "$ua->credentials($netloc, $realm, $uname, $pass)" > but i do not understand what is $netloc and $realm is... $netloc is the network location. Meaning the http address plus the port the server is running on. $realm i

LWP::UserAgent Question

2004-03-31 Thread Hari Fajri
Hi all i'm new to perl. I'm trying to download file using LWP::UserAgent module from "http://www.abcd.com/thisfile.zip"; but, i need to supply user name & password first before downloading that file. how to do that using LWP::UserAgent? for example, user name = "u

RE: Problem with LWP::UserAgent

2004-02-23 Thread Rajesh Dorairajan
"config.xml", VarAttr => 'name', ContentKey => '-content' ); foreach my $keys ( keys %{$config} ) { foreach (sort keys %{$config->{$keys}} ) { my $url = $config->{$keys}{$_}; #$url = "http://server:port";; my $retval = testURL( $url )

RE: Problem with LWP::UserAgent

2004-02-19 Thread david
t your respond below the relevant text. >> > >> > --- >> > #Working code >> > >> > #!/usr/bin/perl >> > use strict; >> > use LWP::UserAgent; >> > my $url = "http://rajeshd";; >> >

Re: Problem with LWP::UserAgent

2004-02-19 Thread Rob Dixon
Rajesh Dorairajan wrote: > > I've had this problem for a long time and I am in a sort of a dead-end and > could use some help. When I make a get request using the LWP UserAgent > inside a function and I pass a URL to the function as a string I get a > response. However, when I

RE: Problem with LWP::UserAgent

2004-02-18 Thread Rajesh Dorairajan
Sorry the syntax error was by mistake. It's not in the actual code. Rajesh > -Original Message- > From: david [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 18, 2004 4:01 PM > To: [EMAIL PROTECTED] > Subject: Re: Problem with LWP::UserAgent > >

Re: Problem with LWP::UserAgent

2004-02-18 Thread david
Rajesh Dorairajan wrote: > I've had this problem for a long time and I am in a sort of a dead-end and > could use some help. When I make a get request using the LWP UserAgent > inside a function and I pass a URL to the function as a string I get a > response. However, when I pas

Re: Problem with LWP::UserAgent

2004-02-18 Thread WilliamGunther
Actually, this is a little bit of an incorrect question. If your first code worked (which it doesn't for me by the way), and if in your second $config->{URL_1} does equal http://rajeshd, they're the same. So, the problem is somewhere else.

Problem with LWP::UserAgent

2004-02-18 Thread Rajesh Dorairajan
I've had this problem for a long time and I am in a sort of a dead-end and could use some help. When I make a get request using the LWP UserAgent inside a function and I pass a URL to the function as a string I get a response. However, when I pass a variable that contains the URL (typically a

Re: Is it necessary to set the headers when using LWP::UserAgent->post

2004-01-24 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dan Anderson) writes: >I noticed in the POD for LWP::UserAgent that the post method doesn't >have an option to add headers. Are headers (like UserAgent:) not needed >for POSTing? Or am I missing how to do it? Sure

Is it necessary to set the headers when using LWP::UserAgent->post

2004-01-22 Thread Dan Anderson
I noticed in the POD for LWP::UserAgent that the post method doesn't have an option to add headers. Are headers (like UserAgent:) not needed for POSTing? Or am I missing how to do it? Thanks in advance, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

RE: Writing custom cookies using LWP::UserAgent

2004-01-20 Thread Bakken, Luke
> I am having LWP::UserAgent fetch information from a site that uses > Javascript to write a cookie like this: > > document.cookie = "jscript=1; path=/;"; > > Is there any way to tell my User Agent to add that cookie to > the cookie > jar? I had to do somet

Writing custom cookies using LWP::UserAgent

2004-01-20 Thread Dan Anderson
I am having LWP::UserAgent fetch information from a site that uses Javascript to write a cookie like this: document.cookie = "jscript=1; path=/;"; Is there any way to tell my User Agent to add that cookie to the cookie jar? Thanks, Dan -- To unsubscribe, e-mail: [EMAIL PROT

Re: Problems with LWP::UserAgent

2003-12-27 Thread Randal L. Schwartz
> "Dan" == Dan Anderson <[EMAIL PROTECTED]> writes: Dan> I guess I should stop then, but I was looking at O'Reilly's Dan> robots.txt file (http://safari.oreilly.com/robots.txt): Dan> User-Agent: * Dan> Allow: / Dan> Which made me think spidering was alright. That's for spide

Re: Problems with LWP::UserAgent

2003-12-26 Thread Dan Anderson
> "Fair use" is copyright law -- I don't know whether you're infringing > anybody's copyright, but you're certainly violating O'Reilly's Terms of > Service, which requires that you agree: > > not to use "Web spiders" or any other automated retrieval > mechanisms when using the Service othe

Re: Problems with LWP::UserAgent

2003-12-26 Thread Steve Grazzini
On Fri, Dec 26, 2003 at 12:52:06PM -0500, Dan Anderson wrote: > So, all in all, I think that my usage falls under the term fair use. > I have no desire to circumvent Safari's security -- I'm just looking > to speed up something I do which conforms to the TOS of the web site. "Fair use" is copyri

Re: Problems with LWP::UserAgent

2003-12-26 Thread Dan Anderson
> Call me an old fogy, but I think that some of the mechanization of Web > communications has gone too far. Providing interactive features in the CGI > is one thing. It provides services for both sides of any transaction > involved. Batch harvesting of pages meant for human perusal, like batch >

Re: Problems with LWP::UserAgent

2003-12-26 Thread R. Joseph Newton
zentara wrote: > On 24 Dec 2003 16:05:16 -0500, [EMAIL PROTECTED] (Dan Anderson) wrote: > > > >I am trying to create a spider to grab my books off of Safari > >for a batch printing job so I don't need to go through each chapter > >myself and hit the Print button. So I used this script

Re: Problems with LWP::UserAgent

2003-12-26 Thread Rob Dixon
te: > > # BEGIN CODE > #! /usr/bin/perl > > use strict; > use warnings; > use LWP; > use LWP::UserAgent; Use one or the other, but not both. LWP is a module that just 'require's LWP::UserAgent. > # variables > my $cookie_jar_file = "./cookies.txt"; &

Problems with LWP::UserAgent

2003-12-24 Thread Dan Anderson
; use warnings; use LWP; use LWP::UserAgent; # variables my $cookie_jar_file = "./cookies.txt"; my @headers = ( 'User-Agent' => 'Mozilla/4.76 [en] (Win98; U)', 'Accept' => 'image/gif, image/x-bitmap, i

Re: Can't locate object method "get" via package "LWP::UserAgent"

2003-11-25 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > #!/usr/bin/perl > > use strict; > use URI; > #use HTTP::Request::Common qw(GET); > use LWP; > #use HTTP::Response; > > my $browser = LWP::UserAgent->new; > $browser->env_proxy(); > my > $response=$browser-&

RE: Can't locate object method "get" via package "LWP::UserAgent"

2003-11-24 Thread NYIMI Jose (BMB)
I haven't seen where you said: use LWP::UserAgent; José. -Original Message- From: PerlDiscuss - Perl Newsgroups and mailing lists [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:50 AM To: [EMAIL PROTECTED] Subject: Can't locate object method "get" via pac

Can't locate object method "get" via package "LWP::UserAgent"

2003-11-24 Thread PerlDiscuss - Perl Newsgroups and mailing lists
#!/usr/bin/perl use strict; use URI; #use HTTP::Request::Common qw(GET); use LWP; #use HTTP::Response; my $browser = LWP::UserAgent->new; $browser->env_proxy(); my $response=$browser->get('http://finance.yahoo.com/d/quotes.csv?s=msft&f=sl1d1t1c1ohgv'); print $response

RE: Peculiar problem using LWP::UserAgent

2003-11-12 Thread Rajesh Dorairajan
e- From: david [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 3:19 PM To: [EMAIL PROTECTED] Subject: Re: Peculiar problem using LWP::UserAgent Rajesh Dorairajan wrote: > I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not > yet implemented error when I conne

Re: Peculiar problem using LWP::UserAgent

2003-11-11 Thread drieux
On Monday, Nov 10, 2003, at 13:31 US/Pacific, Rajesh Dorairajan wrote: [..] I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not yet implemented error when I connect to a web-server using the User-Agent. [..] Oye, excuse me if I do a 'homer simpson' here. doo

RE: Peculiar problem using LWP::UserAgent

2003-11-11 Thread Rajesh Dorairajan
Sorry. Forgot to mention. $Host already contains http://servername Thanks Rajesh -Original Message- From: Sethi, Pradeep [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2003 1:23 PM To: Rajesh Dorairajan Subject: RE: Peculiar problem using LWP::UserAgent What's the val

Re: Peculiar problem using LWP::UserAgent

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 13:16 US/Pacific, Rajesh Dorairajan wrote: [..] my ( $Host, $Port ) = @_; my $url = "$Host:$Port"; #Does not work #my $url = "http://servername:80";#This works require LWP::UserAgent; my $ua = LWP::UserAgent

Re: Peculiar problem using LWP::UserAgent

2003-11-10 Thread david
Rajesh Dorairajan wrote: > I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not > yet implemented error when I connect to a web-server using the User-Agent. > This happens when I pass in the Hostname and Portnumber as parameters in > my function. However, if I h

Peculiar problem using LWP::UserAgent

2003-11-10 Thread Rajesh Dorairajan
I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not yet implemented error when I connect to a web-server using the User-Agent. This happens when I pass in the Hostname and Portnumber as parameters in my function. However, if I hard-code the Server-name and port number it seems

Re: LWP::UserAgent w/username and password.

2003-03-26 Thread Steve Grazzini
Mike Blezien <[EMAIL PROTECTED]> wrote: > > I'm working on a project, which uses the LWP::UserAgent > module, and all is working fine untill we had to password > protect a folder with a .htaccess file, on the remote > server. Now we can't grab the file from th

Re: LWP::UserAgent w/username and password.

2003-03-26 Thread Rob Dixon
Mike Blezien wrote: > hello all, > > I'm working on a project, which uses the LWP::UserAgent module, and all is > working fine untill we had to password protect a folder with a .htaccess file, > on the remote server. Now we can't grab the file from the remote server,

LWP::UserAgent w/username and password.

2003-03-25 Thread Mike Blezien
hello all, I'm working on a project, which uses the LWP::UserAgent module, and all is working fine untill we had to password protect a folder with a .htaccess file, on the remote server. Now we can't grab the file from the remote server, without the passing the proper access i

Re: LWP::UserAgent

2002-11-27 Thread Rob Dixon
Hi Nandita LWP::UserAgent has redirect enabled only for methods GET and HEAD by default. Since the form's submit method is almost certainly POST, the redirected responses won't be followed. Add POST to the list of redirected methods with $ua->requests_redirectable ( ['G

LWP::UserAgent

2002-11-27 Thread Nandita Shenvi
Hi all, I have a perl script that fills submits a HTML form with METHOD POST and input type file. #!/usr/bin/perl -w use strict; use HTML::TreeBuilder; use HTTP::Request::Form; use LWP::UserAgent; use URI::URL; # Upload the Website my $url = url 'http://some

Re: AW: Problems with LWP::UserAgent and HTTP::Response

2001-06-18 Thread Jos Boumans
.74 [en] (Win98; U)', form => 'select=All&for=', }; ### Set up the content ### my $content = $href->{form} . $film; # here, $film is the user input ### Set up the useragent ### my $ua = new LWP::UserAgent; $ua->agent( $href->{ua} ); ### Set up the headers

AW: Problems with LWP::UserAgent and HTTP::Response

2001-06-18 Thread Ela Jarecka
Ela Jarecka; Beginners list (E-Mail) > Betreff: Re: Problems with LWP::UserAgent and HTTP::Response > > > Hi Ela, > The documentation for perl LWP agent seems sparse. I had a > difficult time > figuring out how to send multipart form-data. I'll share the > code with y

Re: Problems with LWP::UserAgent and HTTP::Response

2001-06-18 Thread Tim Keefer
Hi Ela, The documentation for perl LWP agent seems sparse. I had a difficult time figuring out how to send multipart form-data. I'll share the code with you that some shared with me. Hope it helps. require LWP; use LWP::UserAgent; use HTTP::Request::Common; # Create a user agent o

Problems with LWP::UserAgent and HTTP::Response

2001-06-18 Thread Ela Jarecka
Hi, I am using the following code to send and XML document ( output.xml ) to a remote server: use strict; use LWP::Debug qw(+); use LWP::UserAgent; use IO; my $resp; $resp = 'response.xml'; my $FILEH; open (FILEH, ) or die "Can't open file output.xml!\n"; my