Leser: 21
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/perl -w use strict; use WWW::Mechanize; use HTTP::Cookies; my $bot = WWW::Mechanize->new( autocheck => 0 ); $bot->cookie_jar( HTTP::Cookies->new( file => "cookies.txt", autosave => 1, ignore_discard => 1, ) ); my $response = $bot->get( 'https://bitshare.com/login.html/' ); $bot->form_number(1); $bot->field( user => 'user' ); $bot->field( pass => 'pass' ); $response = $bot->click(); print $response->content();
Can't call method "value" on an undefined value at C:/strawberry/perl/site/lib/WWW/Mechanize.pm line 1403.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<form action="http://bitshare.com/login.html" method="post" id="LoginForm" onsubmit="RemoveBlanks();">
<table style="border: medium none;">
<tbody><tr>
<td colspan="2">
</td>
</tr>
<tr>
<td style="text-align: right;">Benutzername:</td>
<td style="text-align: left;"><input id="user" name="user" value="" style="width: 300px;" type="text"></td>
</tr>
<tr>
<td style="text-align: right;">Passwort:</td>
<td style="text-align: left;"><input id="pass" name="pass" value="" style="width: 300px;" type="password"></td>
</tr>
<tr>
<td></td>
<td style="text-align: left;">
<div style="float: right; padding-top: 10px;"><a href="http://bitshare.com/lostpassword.html">Passwort vergessen?</a></div>
<input value="Login" name="submit" class="blue" type="submit">
</td>
</tr>
<tr>
<td></td>
<td style="text-align: right;"></td>
</tr>
</tbody></table>
</form>
2☻Ù→"¶ö¶I↨¨jõNıîdßò▼▄tRÿÞü