tunerooster has asked for the wisdom of the Perl Monks concerning the following question:
Manually, in my chrome browser, when I visit grocery.walmart.com, it remembers my login and logs me in automatically. When I access the site within WWW::Mechanize::Chrome, it does not. I am pretty sure Walmart uses cookies to do this. I simply need to know how to make auto-login via cookies work with WWW::Mechanize::Chrome. This is my code which does not auto-login:
use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; Log::Log4perl->easy_init($ERROR); my $mech = WWW::Mechanize::Chrome->new( headless => 0, ); $mech->get('https://grocery.walmart.com'); my $png = $mech->content_as_png();
I should mention, it is critical to auto-login because Walmart uses login captchas to defeat bots.
Thanks for any help!P.S. Any idea why WWW::Mechanize::Chrome doesn't load cookies by default?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW:Mechanize::Chrome cookies
by Corion (Patriarch) on May 21, 2020 at 17:45 UTC | |
by tunerooster (Acolyte) on May 22, 2020 at 09:08 UTC | |
by Corion (Patriarch) on May 24, 2020 at 17:34 UTC | |
|
Re: WWW:Mechanize::Chrome cookies
by nysus (Parson) on May 21, 2020 at 17:11 UTC | |
by tunerooster (Acolyte) on May 22, 2020 at 09:14 UTC |