in reply to How can I extract an email behind a JS button?

I don't see any code that tries to identify the button to click, nor any code that tries to click it.

Can you be more specific where you need help? This is not a code writing service.

  • Comment on Re: How can I extract an email behind a JS button?

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

    Hi Corion, here is what I tried as far as mimicking what the button click did. I used Mozilla developer to look at the post command and used the transmitted data however what I'm sending looking to be in the wrong format as it's returning an error. From what I know it's supped to be in this format and what I used is right after:

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

    $mech->post(https://reporter.nih.gov/services/Projects/PiPoEmails, Content => {project_id:”10702248”});
    $mech->post(https://reporter.nih.gov/services/Projects/PiPoEmails, Con +tent => {recaptcha:"03AFcWeA7e6fsRQ02z43ij7N6u2b9lXbajsQs_cLex50-fcjO +zm8w17PogPUhTf2cTarSroDhsqdGVng0ZMJNtI_yykUez7G8bIDhaL6y2AD1W4JJrzTkG +jDiqa_S-yHy15f2jVN-oSPB_idz9PvvYUGZ60ZeJq7WHA7VJJFbp-qha3RGA2A3RmA9ri +vViSdSK_pCYMVGzuGrQCX3ym-0TXy6a2xWVOSijy6fG0ReXO-8IhYtnSn_uUstoAZSfCK +xRJzquCh2EmIb41GTOrApRN-osiE-1l4cc84tKvngBoiUsLiOeTJasoudWCQ-9ID3eUtj +ucB6wKEVwtdvBCxdLlidPL5E9wHQUiJFGl-sun6gEzqVfZ4nQfUTi-CZ0SB2GJhu2-EDI +pkBdq75AzwwjHqT5vS-Q_PS11hRAosELBWf3-RY_DyrG5iYJhuFFerZOE4ymD20EN9hKw +_tAkPuFi9OkKXFNsiGx0toZ5jIFiPJaSe1EaAShNfW8Vy_f7BMDEo3U6Kx-dKEyDL3zHm +smyCeXZDsiyeDWfvQEoET1tESwZjQVhHDuDZUHwhYZKZUPMFVI3MvhxHglIkrxOcllwv7 +NUopJxnS9TOrU6uQG1ag56DMZ36EZ3RFRBrvEXn430ek8I89SqcyYWDwkjMvg3dkjBct4 +3QstZw"});

    If someone could LMK where the formatting errors are in what I'm posting I'd greatly appreciate it. Thanks!

      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.

        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”});