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
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
.
#!/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
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
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
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/'
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
>>>>> ""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
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
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
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
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
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'
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?
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);
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
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
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;
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
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
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
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
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-
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
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
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 ?!
&
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
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
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
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
"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 )
t your respond
below the relevant text.
>> >
>> > ---
>> > #Working code
>> >
>> > #!/usr/bin/perl
>> > use strict;
>> > use LWP::UserAgent;
>> > my $url = "http://rajeshd";;
>> >
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
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
>
>
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
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.
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
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
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: [
> 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
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
> "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
> "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
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
> 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
>
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
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";
&
;
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
<[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-&
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
#!/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
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
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
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
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
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
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
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
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,
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
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
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
.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
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
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
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
66 matches
Mail list logo