How to Parse multiple identical dynamic parameters



  • </div>
    </div>
    <input type="hidden" name="mc_key" id="mc_key" value="token_283" />
    <input type="hidden" name="mc_code" id="mc_code" />
    <input type="hidden" name="Yw55vQ" id="Yw55vQ" value="06kcaY4_oXjDY-CB5lvTyk6edgWgn6qEuo2mMFvDfmE" />
    <input type="hidden" name="source" id="source" value="pledging_form" />
    <input type="hidden" name="postback_payment_method" id="postback_payment_method" />
    <div class='payment-information'>
    <div class='row'>

    ....................................................................................
    i want to parse "Yw55vQ" and "06kcaY4_oXjDY-CB5lvTyk6edgWgn6qEuo2mMFvDfmE" ,but they are both changes every time


  • Admin

    CSS Selector: input
    Attribute: either name or value depending on which one you're parsing
    Index: 2

    That might not work if there are more <input> tags before (not shown in your post) so adjust the index accordingly if there are more.



  • @Ruri I want to parse name and value both,but both are changing

    <input type="hidden" name="Yw55vQ" id="Yw55vQ" value="06kcaY4_oXjDY-CB5lvTyk6edgWgn6qEuo2mMFvDfmE" />

    i want parse the name "Yw55vQ"and the value "06kcaY4_oXjDY-CB5lvTyk6edgWgn6qEuo2mMFvDfmE",the problem is the name and value both changing



  • @Ruri said in How to Parse multiple identical dynamic parameters:

    name

    <input type="hidden" name="mc_code" id="mc_code" />
    <input type="hidden" name="kwpnNw" id="kwpnNw" value="pUmUEzFeUzIudhmsAeILUAcq2kKwzXSXE3L0ecIOhts" />
    <input type="hidden" name="source" id="source" value="pledging_form" />
    <input type="hidden" name="mc_key" id="mc_key" value="token_154" />
    <input type="hidden" name="postback_payment_method" id="postback_payment_method" />
    <div class='payment-information'>

    <input type="hidden" name="mc_key" id="mc_key" value="token_283" />
    <input type="hidden" name="mc_code" id="mc_code" />
    <input type="hidden" name="Yw55vQ" id="Yw55vQ" value="06kcaY4_oXjDY-CB5lvTyk6edgWgn6qEuo2mMFvDfmE" />
    <input type="hidden" name="source" id="source" value="pledging_form" />
    <input type="hidden" name="postback_payment_method" id="postback_payment_method" />
    <div class='payment-information'>

    and the line i want to parse index number also changing everytime


  • Admin

    Did you read what I wrote?


  • Admin

    You have to use a parse block in CSS selector mode.


  • Admin

    The other option would be to use regex.
    https://regex101.com/r/BGBgoS/2
    This can be done easily since the length of the fields is the same every time



  • @Ruri yes,i read it,through your answer, I understand that css can achieve dynamic parameter parsing.but I don't understand how to operate index number change every time,some times the name i want parse index number should be 2,some times the name i want parse index number should be 3,some times the name i want parse index number should be 4.I don't know how to handle this situation.

    <input type="hidden" name="mc_code" id="mc_code" />
    <input type="hidden" name="kwpnNw" id="kwpnNw" value="pUmUEzFeUzIudhmsAeILUAcq2kKwzXSXE3L0ecIOhts" /> index2
    <input type="hidden" name="source" id="source" value="pledging_form" />
    <input type="hidden" name="mc_key" id="mc_key" value="token_154" />
    <input type="hidden" name="postback_payment_method" id="postback_payment_method" />
    <div class='payment-information'>

    <input type="hidden" name="mc_key" id="mc_key" value="token_283" />
    <input type="hidden" name="mc_code" id="mc_code" />
    <input type="hidden" name="Yw55vQ" id="Yw55vQ" value="06kcaY4_oXjDY-CB5lvTyk6edgWgn6qEuo2mMFvDfmE" />index3
    <input type="hidden" name="source" id="source" value="pledging_form" />
    <input type="hidden" name="postback_payment_method" id="postback_payment_method" />
    <div class='payment-information'>

    <input type="hidden" name="mc_code" id="mc_code" />
    <input type="hidden" name="source" id="source" value="pledging_form" />
    <input type="hidden" name="postback_payment_method" id="postback_payment_method" />
    <input type="hidden" name="Y-4Fkw" id="Y-4Fkw" value="jROEOxukmLobC0mbgQZVBRMogXD4LuUrWDVorS0sURs" >index4
    <input type="hidden" name="mc_key" id="mc_key" value="token_538" />
    <div class='payment-information'>



  • @Ruri use regex can solve it。thank you very much for your help


  • Admin

    Ah okay my bad then I didn't understand what you meant.


Log in to reply