I need to grab and debug all HTTP-requests and responds which I make from lynx or another text-based browser. How can I save all request URLs, redirects, headers and page sources for analyze and debug this information? I do not need JavaScript support. What tools are better for this purpose?


To partially solve my problem, I used w3m text-based browser.

I start w3m with -reqlog option and w3m save all headers, addresses history and cookies in ~/.w3m directory.

For example:

$ w3m -reqlog https://google.com

Check ~/.w3m:

$ ls ~/.w3m
cookie  history  request.log

In ~/.w3m/request.log stored all headers.

How can I keep the body of the pages?

  • 1
    I think you mean "grab" here, not "grub", so I changed that. Have a look at wireshark; it's easy enough to view the http headers and allows you to save a record you can latter re-examine. You need to do a little setup to run it as a regular user by adding yourself to the wireshark group (and logging in again to make that effective).
    – goldilocks
    Nov 19 '14 at 14:42

Lynx's -trace option logs the information requested by OP, along with much more. That is written to ~/Lynx.trace

Further reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.