in reply to Re^2: How can I extract an email behind a JS button?
in thread How can I extract an email behind a JS button?

You need to learn and understand what you are seeing.

The POST is the solved Recaptcha to verify that you are human. You cannot easily replicate that using a POST command.

I would guess that the best approach is to use the ->click() command.

Replies are listed 'Best First'.
Re^4: How can I extract an email behind a JS button?
by Anonymous Monk on Mar 18, 2024 at 15:57 UTC

    So the browser posts include the captcha though all you need to do is click the email button to see it, no solving anything required. So If I just need to send the first post what am I getting wrong with the format here?

    Format I found:

    $mech->post(Request_URL, Content => {FORM_FIELDS...});

    What I tried:

    $mech->post(https://reporter.nih.gov/services/Projects/PiPoEmails, Content => {project_id:”10702248”});

      "Format I found" is not really a substitute for reading the documentation at WWW::Mechanize::Chrome. I already suggested looking at the ->click method.

      You don't tell us how what you tried fails, and posting small unconnected snippets does not let us reproduce your situation. Consider posting an SSCCE.