Re: WWW::Mechanize question

2014-11-04 Thread John SJ Anderson
well, are you passing the authentication credentials when you create the LWP useragent? IIRC, there's a whole section in the LWP documentation on HTTP basic auth... (also, you might want to consider taking your questions over to 'beginn...@perl.org' -- not sure there are that many people on this

WWW::Mechanize question

2014-11-03 Thread Patton, Billy N
I’ve inherited an app that uses templates. Most of the template contain multiple forms and tables within and buttons within that. The order of the forms I can get from the template, most are not named forms so I have to get them with form_number(#) Question: Can I depend on the form

Re: WWW::Mechanize question

2014-11-03 Thread John SJ Anderson
Hi Billy - Are any of the forms in the templates displayed conditionally? (I.e., are there forms inside IF blocks in the templates.) If not -- if all the forms are always shown -- then yes, the numbers should be stable. My suggestion would be to just add unique identifiers to the forms, because

Re: WWW::Mechanize question

2014-11-03 Thread Patton, Billy N
Thanks, Some times it is conditional, depending on admin rights. But your right I should add a name to each of them, it would make things much easier. Just can’t do it to the current production version. Guess I need to make copy and test that one :) On Nov 3, 2014, at 8:50 AM, John SJ Anderson

Re: WWW::Mechanize question

2014-11-03 Thread Patton, Billy N
I’ve gotten everything copied and working from the Chrome, but when I execute my test script I get : ok 1 - In sub main::login ok 2 -: 49 : Credentials passed ok Error GETing http://cportal-test.dfw0.hypercube-llc.com/html/cp.cgi: Authorization Required at

WWW::Mechanize question

2008-05-31 Thread Richard Lee
what is wrong w/ below? I would think this would work but this is spitting out use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize-new(); my $url = 'http://10.212.100.1'; #$mech-credentials('user1', 'passwd1'); my $page = $mech-get( $url ); print $page\n; when I run it,

Re: WWW::Mechanize question

2008-05-31 Thread Gunnar Hjalmarsson
Richard Lee wrote: what is wrong w/ below? I would think this would work but this is spitting out use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize-new(); my $url = 'http://10.212.100.1'; #$mech-credentials('user1', 'passwd1'); my $page = $mech-get( $url ); print

Re: www::mechanize question

2007-04-01 Thread Peter Scott
On Fri, 30 Mar 2007 20:45:43 +0100, Rob Dixon wrote: Jason Roth wrote: I'm using www::mechanize to submit a form to a website, and one of the fields is disabled (and enabled by javascript on the page which obviously isn't running). When I try to set a value for this field I get a no such

www::mechanize question

2007-03-30 Thread Jason Roth
I'm using www::mechanize to submit a form to a website, and one of the fields is disabled (and enabled by javascript on the page which obviously isn't running). When I try to set a value for this field I get a no such field error. How to I set a value for, and enable, disabled form fields?

Re: www::mechanize question

2007-03-30 Thread Rob Dixon
Jason Roth wrote: I'm using www::mechanize to submit a form to a website, and one of the fields is disabled (and enabled by javascript on the page which obviously isn't running). When I try to set a value for this field I get a no such field error. How to I set a value for, and enable,

Re: www::mechanize question

2007-03-30 Thread Mumia W.
On 03/30/2007 01:20 PM, Jason Roth wrote: I'm using www::mechanize to submit a form to a website, and one of the fields is disabled (and enabled by javascript on the page which obviously isn't running). When I try to set a value for this field I get a no such field error. How to I set a value

WWW::Mechanize question

2006-01-17 Thread Ing. Branislav Gerzo
Hi all there, I'd like to use %subj% with caching options. I know how to use Cache::File; or WWW::Mechanize::Cached. Problem comes, when I want to cache webpage with forms (POST). I decide not to use WWW::Mechanize::Cached, because it uses as key given URL (as I decoded that from source). I

Re: WWW::Mechanize question

2006-01-17 Thread Randal L. Schwartz
Ing == Ing Branislav Gerzo [EMAIL PROTECTED] writes: Ing Problem comes, when I want to cache webpage with forms (POST). This is strange. POST requests are not necessarily idempotent, and this is why caches never cache them. Perhaps you want to turn these POSTs into GETs instead, if you know

Re: WWW::Mechanize question

2006-01-17 Thread Brano Gerzo
Randal L. Schwartz [RLS], on , , 2006 at 09:01 (-0800) contributed this to our collective wisdom: Ing Problem comes, when I want to cache webpage with forms (POST). RLS This is strange. POST requests are not necessarily idempotent, and this is RLS why caches never cache them. Perhaps you want

Re: WWW::Mechanize question

2004-05-13 Thread Paul Johnson
On Wed, May 12, 2004 at 12:59:44PM -0500, Ben Miller wrote: my @links = $mech-find_all_links(tag = a, text_regex = qr/\bWORD\b/i ); ... tag = a, ... I suspect. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

WWW::Mechanize question

2004-05-12 Thread Ben Miller
Hi, I'm reading/scraping hyperlinks from a specific web page using the following while incorporating the WWW::Mechanize module: my @links = $mech-find_all_links(tag = a, text_regex = qr/\bWORD\b/i ); When I run the program, I get an error: 'Can't modify constant item in scalar assignment at

Re: WWW::Mechanize question

2004-05-12 Thread JupiterHost.Net
Ben Miller wrote: Hi, Hello, I'm reading/scraping hyperlinks from a specific web page using the following while incorporating the WWW::Mechanize module: my @links = $mech-find_all_links(tag = a, text_regex = qr/\bWORD\b/i ); try tag = 'a' you are trying to assign a value of a to tag the way it

Re: WWW::Mechanize question / array values

2004-05-12 Thread Ben Miller
On 5/12/04 1:26 PM, Paul Johnson wrote: On Wed, May 12, 2004 at 12:59:44PM -0500, Ben Miller wrote: my @links = $mech-find_all_links(tag = a, text_regex = qr/\bWORD\b/i ); ... tag = a, ... I suspect. Thank you to Paul and to Lee for their quick and efficient answer. That was exactly

Re: WWW::Mechanize question / array values

2004-05-12 Thread JupiterHost.Net
Next and hopefully last question for now on a more general subject: Why do array members take the form of 'ARRAY(0x90df74)' rather than the actual content fed to an array or variable? Whatever variable looks like that when printed if an array reference. for(@links) { print @{$_}; } see perldoc