All,
I am trying to automate upload of pics to "http://www1.snapfish.com/welcomenphu". But I am having issue with javascript. First cut at automating the login with web mechanize:
use WWW::Mechanize;
#use HTML::TokenParser;
my $agent = WWW::Mechanize->new;
$agent->get("http://www1.snapfish.com/welcomenphu");
$agent->form("form1");
$agent->field("emailaddress","me@mykingdom");
$agent->field("password","123");
$agent->click();
print "$agent->{content}";
The next page, if I login successfully will have my photo album dir. However, this is not the case; I dump out the output in html format and used firefox to view it. It prompts me that the account already exists and asked if I want to create another account or click the login button. When I click on the login button, it brings me to the page where my album dir is located. I am thinking it's a javascript issue. Any idea? Thanks.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|