Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: www::mechanize and www:mechanize::firefox

by shagbark (Acolyte)
on Apr 02, 2016 at 06:21 UTC ( [id://1159353]=note: print w/replies, xml ) Need Help??


in reply to Re^3: www::mechanize and www:mechanize::firefox
in thread www::mechanize and www:mechanize::firefox

Yes. You haven't installed the extension mozrepl in your Firefox.

However, although installing it will stop the crash, it won't load your cookies with the current Firefox. I have searched for hours, and not found any Perl module that can load either Chrome 49 or Firefox 45 cookies. (Chrome cookies now have their values encrypted.)

I installed https://addons.mozilla.org/en-US/firefox/addon/cookie-exporter/, exported my Firefox cookies to cookies.txt, and tried reading that with the old HTTP::Cookies::Netscape->new(file => $CookieFile, autosave=>0). It doesn't work right off, because cookie-exporter doesn't write out the header indicating the file is a Netscape cookies file, so HTTP::Cookies::Netscape won't read it. (It's vital to use perl -w when trying HTTP::Cookies::Netscape, or else it won't tell you why it fails.)

So, first add the line
# Netscape HTTP Cookie File to the file, and then HTTP::Cookies::Netscape can read it.

The correct documentation on the Netscape cookies file format does not appear to exist anymore, only documentation of the format of the individual lines. As a result, we have a new generation of tools that say they're using Netscape cookies format, but aren't.

Alternately, you may have to just find the user's cookie sqlite db, open it via DBI, and query it for the cookies you want.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1159353]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-19 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found