Jump to content
Sign in to follow this  
Medic873

Pull Data Email LIst

Recommended Posts

Medic873

Hello,

I run this website obviously it is my name after all

medic873.com/email.html has all the data on it

But here is my issue I want to pull all the email address and put them into a array. But right now I am using the @ sign to do thing and its dividing it all wired

I want this

Start[1]="jenifer@gmail.com"

Start[2]="hello@cox.net"

 

Here is my current code

Thanks a ton

 

$NameGenerator = _INetGetSource('http://www.behindthename.com/random/random.php?number=2&gender=f&surname=&all=no&usage_est=1&usage_lim=1')
$Start = _StringBetween($NameGenerator, '<center><p><span class="heavymedium">', '</div>')
$Name = _StringBetween ($Start[0], '" class="plain">', '</a>');
Edited by Medic873

Share this post


Link to post
Share on other sites
Medic873

No I am the one confused I am trying to use the AT Sign to find all the possible emails in the file so right now I am going between all of them and its messing up my list

What function would you use for this?

Share this post


Link to post
Share on other sites
water

What Danp2 wants to tell you:

In the text you talk about "medic873.com/email.html" but in your code you use "www.behindthename.com"


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Medic873

sorry here you go and Im confused about how to use stringregexp

$NameGenerator = _INetGetSource('http://www.medic873.com/email.html')
$Start = _StringBetween($NameGenerator, '<', '.com')
$End = _StringBetween($
_arrayDisplay($Start)

Share this post


Link to post
Share on other sites
jdelaney

Provide an actual example of the node containing the email.  I can show you an XMLDOM hack to grab all the emails.

$sYourHTML = '<html><body><email id="problem_desc">Something@something.com</email><email id="problem_desc">Something2@something.com</email><email id="problem_desc">Something3@something.com</email></body></html>'
$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.loadXML('<?xml version="1.0" encoding="utf-8"?><root>' & $sYourHTML & '</root>' & @CRLF)

$oEmails = $oXML.selectNodes("//email")
For $oEmail In $oEmails
    ConsoleWrite($oEmail.text & @CRLF)
Next

output for the above:

Something@something.com
Something2@something.com
Something3@something.com

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
Medic873

Hey it looks like that will work but you can you make it out put in an array 

_arraydisplay ($oEmails)

dose not seem to work

Share this post


Link to post
Share on other sites
jdelaney

That's a collection, not an array.

You have to loop through it like I've shown.  You can then output the data into an array.

Or, something like this:

#include <array.au3>
$sYourHTML = '<html><body><email id="problem_desc">Something@something.com</email><email id="problem_desc">Something2@something.com</email><email id="problem_desc">Something3@something.com</email></body></html>'
$oXML = ObjCreate("Microsoft.XMLDOM")
$oXML.loadXML('<?xml version="1.0" encoding="utf-8"?><root>' & $sYourHTML & '</root>' & @CRLF)

$oEmails = $oXML.selectNodes("//email")

If $oEmails.Length>0 Then
    Local $aArray[$oEmails.Length]
Else
    $aArray=""
EndIf

For $i = 0 To UBound($aArray)-1
    $aArray[$i] = $oEmails.item($i).text
Next
_ArrayDisplay($aArray)
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×