Subject: | mech-dump can find a form that WWW-Mechanize does not ! |
Show quoted text
> mech-dump http://abonnes.lemonde.fr
POST
http://www.lemonde.fr/web/teaser/1,22-0,1-0,0.html?url_zop=http:%2f%2fabonnes.lemonde.fr%2fweb%2fsequence%2f0,2-3208,1-0,0.html
[formulaire]
url= (hidden readonly)
url_zop=http://abonnes.lemonde.fr/web/sequence/0,2-3208,1-0,0.html
(hidden readonly)
login= (text)
password= (password)
<NONAME>=<UNDEF> (image)
sauv_login=1 (checkbox) [<UNDEF>/off|*1]
Show quoted text> ./lemonde.pl
There is no form numbered 1 at ./lemonde.pl line 39
No form defined at ./lemonde.pl line 40
-----------------------------
Here is the part of the code :
$mech->get('http://abonnes.lemonde.fr', ":content_file"=>$fic1);
die $mech->res->status_line unless $mech->success;
$mech->form_name("formulaire");
$mech->set_fields(
login => $LOGIN,
password => $PASS,
);
$mech->submit_form(form_name =>"formulaire");
------------------------------
Show quoted text> perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.20, archname=i586-linux-thread-multi
uname='linux d20 2.4.20 #1 smp thu oct 10 18:10:26 utc 2002 i686
unknown unknown gnulinux '
config_args='-ds -e -Dprefix=/usr -Dusethreads -Di_db -Di_dbm
-Di_ndbm -Di_gdbm -Duseshrplib=true'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3 --pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing'
ccversion='', gccversion='3.3 20030226 (prerelease) (SuSE Linux)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Mar 13 2003 22:22:34
@INC:
/usr/lib/perl5/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.
Show quoted text> uname -a
Linux bdys 2.4.20-4GB #1 Mon Mar 17 17:54:44 UTC 2003 i686 unknown
unknown GNU/Linux
Module id = WWW::Mechanize
DESCRIPTION Automates web page form & link interaction
CPAN_USERID PETDANCE (Andy Lester <andy@petdance.com>)
CPAN_VERSION 1.18
CPAN_FILE P/PE/PETDANCE/WWW-Mechanize-1.18.tar.gz
DSLI_STATUS MdpO (mature,developer,perl,object-oriented)
MANPAGE WWW::Mechanize - Handy web browsing in a Perl object
INST_FILE /usr/lib/perl5/site_perl/5.8.0/WWW/Mechanize.pm
INST_VERSION 1.18