Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Mocking request headers with Test::WWW::Mechanize?

by perlfan (Vicar)
on Oct 25, 2021 at 15:26 UTC ( #11138018=note: print w/replies, xml ) Need Help??

in reply to Mocking request headers with Test::WWW::Mechanize?

If you're grabbing just HTML, I know you know HTTP::Tiny is nice lite'r option. I've never actually needed to use Mechanize - though always wanted to. I seem to have gone from just parsing HTML or JSON with LWP or HTTP::Tiny to using something like Playwright or Firefox::Marionette for interaction. Web::Scraper is super handy here. I know the "dream" is to have browserless browser objects, but frankly I don't know how this kind of thing can be sustainable - I think it's a miracle Mechanize still exists.

Replies are listed 'Best First'.
Re^2: Mocking request headers with Test::WWW::Mechanize?
by Anonymous Monk on Oct 25, 2021 at 15:31 UTC
    Well, in this case, everything is already set up with an elaborate structure and thousands of Mechanize-based tests, so the issue was solely how to do this one thing. I'll leave the restructuring of the entire app to the guy who comes after me :-)
      Indeed - like I said, I've always wanted to use Machanize, so now I'm just showing my envy. Dealing with "real" browsers is about as satisfying as one can suspect.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-01-24 14:48 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (64 votes). Check out past polls.