Jump to content
UBot Underground

Scraping Information That Changes Everytime Like Codes


Recommended Posts

So I wanna goto this page which will help me access my emails all in HTML/XML format. So theres no CSS Design or whatever, its plain text. (so theres like <p = class"whwsujsfg">wedfd</p> and so on)

 

But what i wanna do is scrape info that will change whenever i visit different emails. 

The process is: Amazon sends verification code to email

I open the email link where all the emails are in, in XML format.

The verification code is in this format:

    <title></title>
  </head>
  <body><img width="1" height="1" src="https://www.amazon.com/gp/r.html?C=PEZFBQGDUNSN&M=urn:rtn:msg:20180419140936a14238344d9f406a988242416d80p0na&R=CZMLD9JUU0YS&T=O&U=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FG%2F01%2Fnav%2Ftransp.gif&H=4VUNE5KOILSXGDGKGOIMAAPWRHGA&ref_=pe_1568390_127719720_opens" />
  <table align="center" cellspacing="0" id="container" cellpadding="0">
    <tbody>
    <tr>
      <td>
        <table cellspacing="0" id="content" cellpadding="0">
          <tbody>
          <tr>
            <td id="header">
              <table cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                  <td width="250" id="logo">
<img src="https://images-na.ssl-images-amazon.com/images/G/01/x-locale/cs/te/logo._CB152417367_.png" id="amazonLogo"/>                  </td>
                  <td width="250" id="title" valign="top" align="right"><p></p></td>
                </tr>
                </tbody>
              </table>
            </td>
          </tr>

          <tr>
            <td id="verificationMsg">
              <p>Hello,<br/> We noticed that there was an attempt to sign in to your Amazon account. If you were prompted for a verification code, please enter the following to complete your sign-in.</p>
              <p class="otp">754158</p>
            </td>
          </tr>

          <tr>
            <td id="accountSecurity">
              <p>This code will expire in 10 minutes. 
<br/><br/>
If you did not try to sign in to your account, please change your password immediately by visiting your account settings on Amazon. We also recommend changing password on other non-Amazon websites if you use the same password. 
<br/><br/>
If you have additional questions about account security, please visit amazon.com/security. 
              </p>
            </td>
          </tr>

          <tr>
            <td id="closing">
              <p>Thanks for visiting Amazon!
              </p>
            </td>
          </tr>
          </tbody>
        </table>
      </td>
    </tr>
    </tbody>
  </table>
  <img width="1" height="1" src="https://www.amazon.com/gp/r.html?C=PEZFBQGDUNSN&M=urn:rtn:msg:20180419140936a14238344d9f406a988242416d80p0na&R=CZMLD9JUU0YS&T=E&U=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FG%2F01%2Fnav%2Ftransp.gif&H=EARQZZC7GYLHQZFGFBWTGUMD3IYA&ref_=pe_1568390_127719720_open" /></body>
  </html>

So the code: <p class="otp">754158</p> is what i wanna sceape however the number 754158 changes with each email, so how can i scrape that value which will change to a variable. Thanks so much in advance, please also give like a full script since im very new to botting.

Link to post
Share on other sites

It's so simple i will provide you two methods to do so.Either you find it by xpath, download heopas xpath plugin or generic xpath plugin both are free.

1.From xpath:-

set(#xpath,$plugin function("HeopasCustom.dll", "$Heopas Xpath Parser", $document text, "x://p[@class=\"otp\"]", "InnerText", ""),"Global")
 
2.From regex:-
alert($find regular expression($document text,"(?<=<p class=\"otp\">).*(?=<\\/p>)"))
 
Both will serve you that you want .Hope it helps you
Edited by tinku
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...