Hello Monks!
I can't seem to get to the shopping list page of OOM. 'http://outofmilk.com/ShoppingList.aspx?signin=1'
I've tried a 1000 variations (witness all the sloppy commented code). I can't seem to get past the login page.
When I use the chrome debugger it looks like the POST is executing a GET to get to the shopping list page.
Could not figure out how to do that.
Sorry about the lengthy code, but I wanted to show some of what I tried.</p
I have very little experience with web apps. Please help! Thanks!
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use LWP; use WWW::Mechanize; use Data::Printer colored => 1; my $username = 'email'; my $password = 'password'; my $url = 'https://outofmilk.com'; my $list_url = 'http://outofmilk.com/ShoppingList.aspx?signin=1'; my $mech = WWW::Mechanize->new( autocheck => 0, timeout => 30, ); $mech->agent( "Mozilla/5.0 (Windows NT 6.1)" ); $mech->credentials( $username, $password ); $mech->get($url); print Dumper( $mech->title ); p $mech->response->status_line; my $current = $mech->current_form(); #print Dumper($current); $mech->set_visible( $username, $password ); p $mech->response->status_line; $mech->submit(); p $mech->response->status_line; #print Dumper( $mech->title ); #exit; $mech->get($list_url); p $mech->response->status_line; print Dumper( $mech->title ); #exit; =pod my $result = $mech->submit_form( form_number => 1, fields => { 'id_login-email' => $username, 'id_login-password' => $password, }, ); print $result->content(); =cut # exit; $mech->field( 'login-email' => $username ); $mech->field( 'login-password' => $password ); $mech->submit(); p $mech->response->status_line; exit; p $mech->title; p $mech->res->request->as_string; exit; p $mech->content(); p $mech->res->request->as_string;
In reply to Out of milk website via WWW::Mechanize by bigswifty00000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |