Привет! У меня есть два письма от тиктока, в которых содержатся коды подтверждения. Первое письмо - для регистрации, второе - для восстановления пароля. Мне нужно найти такие отличия в них, чтобы суметь прописать их в парсере (мне нужно получать именно письма для восстановления и игнорировать письма для регистрации). Первое письмо:
<html class="en">



<head>

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <meta name="viewport"

    content="width-device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no, minimal-ui">

  <style>

    * {

      margin: 0;

      font-family: Helvetica;

      box-sizing: border-box;

    }



    a {

      text-decoration: none;

      background-color: transparent;

      outline: none;

      cursor: pointer;

    }



    html.ar {

      direction: rtl;

    }



    html.ar input {

      text-align: right;

    }

  </style>

</head>



<body style="display: flex; justify-content: center;">

  <div style="width:100%;max-width: 440px; padding: 0 20px;">

    <div style="width: 100%; padding: 40px 7px;">

      <img style="width: 150px;"

        src="http://p16-tiktokcdn-com.akamaized.net/obj/tiktok-obj/f70f9d0dc867d6c71ce2cd684a0ffff0"

        style="margin: 40px 12px 40px 12px; width: 150px; height: 40px;">

    </div>

    <div

      style="max-width:100%;background-color: #f1f1f1; padding: 20px 16px; font-weight: bold;font-size: 20px;color: rgb(22,24, 35)">

      Verification Code

    </div>

    <div

      style="max-width:100%;background-color: #f8f8f8; padding: 24px 16px;font-size: 17px;color: rgba(22,24, 35, 0.75);line-height: 20px;">

      <p style="margin-bottom:20px;">To verify your account, enter this code in TikTok:</p>

      <p style="margin-bottom:20px;color: rgb(22,24,35);font-weight: bold;">742465</p>

      <p style="margin-bottom:20px;">Verification codes expire after 48 hours.</p>

      <p style="margin-bottom:20px;">If you didn&#39;t request this code, you can ignore this message.</p>



      <p>TikTok Support Team</p>

      <p style="word-break: break-all;">

        TikTok Help Center: 

        <a style="color: rgb(0, 91, 158);" href="https://support.tiktok.com/">https://support.tiktok.com/</a>

      </p>

    </div>



    <div style="max-width:100%;padding: 40px 16px 20px;font-size: 15px;color: rgba(22, 24, 35, 0.5);line-height:18px;">

      <div>Have a question?</div>

      <div style="margin-bottom:20px;">Check out our help center or contact us in the app using

        <span style="color: rgb(0, 91, 158);font-weight: bold;">Settings &gt; Report a Problem.</span></div>

      <div>This is an automatically generated email. Replies to this email address aren&#39;t monitored.</div>

    </div>

    <div style="border: 0; background-color: rgba(0, 0, 0, 0.12); height: 1px;margin-bottom:16px;"></div>

    <div style="color: rgba(22, 24, 35, 0.5); margin: 20px 16px 40px 16px;font-size: 12px;line-height:18px;">

      <div style="word-break: break-all;">

        <a style="color: rgba(22, 24, 35, 0.5);text-decoration:underline;"

          href="https://www.tiktok.com/en/privacy-policy?lang=en">Privacy Policy

        </a>

      </div>

      <div>TikTok, 10100 Venice Bivd, Culver City, CA 90232</div>

    </div>

  </div>

  </div>

<img src="http://url7709.account.tiktok.com/wf/open?upn=u001.sgosdAuBgxzpib5tMjnZ957QxOD-2Bhr2qIpbpiUuH778bEG2n06MVFzXXnDU0yLlpTaKSFvjc4PyobNCKbvEqCU39PIuilCy4VwOalGexYFolpoEqFMBalY8NEYCy2DStUmIjILVCUAb-2F2nvX-2FrZz3Q5l-2Bno-2B4I4LhPa57fa8DlBQYJ7vnNfiXiNlW4rf1HYGO5rH9bp8XDFn15NNp-2F9H-2BWEPNQVXVQGNhLZicX1tasLNGGs2UjYI8dqocz5L8-2BURSyFs4nZdIKLyzykpD3Am2Y-2BgEAeRFAlelQbbQRO07bKXpuvapQOgtfFLB-2FQ-2FmlH4QUVC8dnJhFbAA1DkRK6PiGxMi37-2BEPqGX6ozqgGYNUGk9vOjnfj35aZrdl7MxOFBZIxY-2BtO7WVTMpquOvg1AIQ-3D-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/></body>



</html>

Второе письмо:
<html class="en">



<head>

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <meta name="viewport"

    content="width-device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no, minimal-ui">

  <style>

    * {

      margin: 0;

      font-family: Helvetica;

      box-sizing: border-box;

    }



    a {

      text-decoration: none;

      background-color: transparent;

      outline: none;

      cursor: pointer;

    }



    html.ar {

      direction: rtl;

    }



    html.ar input {

      text-align: right;

    }

    body {

      width: 100%;

    }

  </style>

</head>



<body style="display: flex; justify-content: center;">

  <div style="width:100%;max-width: 440px;padding: 0 20px;">

    <div style="width: 100%; padding: 40px 7px;">

      <img style="width: 150px;"

        src="http://p16-tiktokcdn-com.akamaized.net/obj/tiktok-obj/f70f9d0dc867d6c71ce2cd684a0ffff0"

        style="margin: 40px 12px 40px 12px; width: 150px; height: 40px;">

    </div>

    <div

      style="max-width:100%;background-color: #f1f1f1; padding: 20px 16px; font-weight: bold;font-size: 20px;color: rgb(22,24, 35)">

      Change your password

    </div>



    <div

      style="max-width:100%;background-color: #f8f8f8; padding: 24px 16px;font-size: 17px;color: rgba(22,24, 35, 0.75);line-height: 20px;">

      <p style="margin-bottom:20px; color: rgba(22,24,35,0.5); ">

        This is an automatically generated email, please do not reply.</p>

      <p style="margin-bottom:20px;">Hi janetbrown209,</p>

      <p style="margin-bottom:20px;">To change your password, enter this verification code in the TikTok app:</p>

      <p style="margin-bottom:20px;color: rgb(22,24,35);font-weight: bold;font-size: 20px;

      line-height: 24px;">359959</p>

      <p style="margin-bottom:20px;">Verification codes expire after 48 hours.</p>

      <p style="margin-bottom:20px;">If you didn&#39;t request this change, ignore this message and your password will remain the same.</p>

      <p>Best,</p>

      <p>TikTok Support Team</p>

      <p style="word-break: break-all;">

        TikTok Help Center: 

        <a style="color: rgb(0, 91, 158);" href="https://support.tiktok.com/">https://support.tiktok.com/</a>

      </p>

    </div>

    

    <div style="max-width:100%;padding: 40px 16px 20px;font-size: 15px;color: rgba(22, 24, 35, 0.5);line-height:18px;">

      <div>Have a question?</div>

      <div style="margin-bottom:20px;">Check out our help center or contact us in the app using

        <span style="color: rgb(0, 91, 158);font-weight: bold;">Settings &gt; Report a Problem.</span></div>

    </div>

    <div style="border: 0; background-color: rgba(0, 0, 0, 0.12); height: 1px;margin-bottom:16px;"></div>



    <div style="color: rgba(22, 24, 35, 0.5); margin: 20px 16px 40px 16px;font-size: 12px;line-height:18px;">

      <div>

        This email was generated for janetbrown209.

      </div>

      <div style="word-break: break-all;">

        <a style="color: rgba(22, 24, 35, 0.5);text-decoration:underline;"

        href="https://www.tiktok.com/en/privacy-policy?lang=en">Privacy Policy

      </a>

      </div>

      <div>TikTok, 10100 Venice Bivd, Culver City, CA 90232</div>

    </div>

  </div>

  </div>

<img src="http://url7709.account.tiktok.com/wf/open?upn=u001.6Zk4zoOPDoFDFuxRInALBIHQQwCmrx6b2qKk-2BSm9qJhUFXYuhcEOzXmUSwa0fXX-2B-2BnRrNvPQ7-2FqSOUFWi-2BJAYj1j9I1-2FUtCm0i3S9pgvoKj3Hl5804R9dZgLFfl7tmqd3uCQf6Of86apFX8QzG-2Bww5PV6jNqJXKawOaMdW9bt3OMpTblbdMnxCEvwwd1ou4sA3z5qhO9CetbXsj96M1-2FKrPKOhRUSgVncPbEvwZPBuB73NVdcSApSED0q-2FBZyK7d9NyPP7-2FU8inn42pSUocRshYLbEVtnGqsUsMylfo9Yq8TNkRhG0NgX66AD3L5loiMRKVYDrErOdRpjbDahhJigOEy5UODcnP-2FZbMDM3O9tR34I0y4IKoRy1xG9Jo1TUZ-2B-2FLtwcVGjPXzklCM-2B10-2Bmgw-3D-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/></body>