Jump to content
Sign in to follow this  
voidale

Harvest ID'S (Members) from html page

Recommended Posts

voidale

Hey guys,

I'm new to autoit, I read like 3 pdfs I can understand the scripts and make something simple only 2 days trying to understand autoit2.

but to create it much more harder. I just need to know how exacly this can be done.

to harvest the ids from this page http://bodyspace.bodybuilding.com/members.php

the usernames you see them as "! ! ! ! aaaa" but when you mouse over there it's like http://bodyspace.bodybuilding.com/aaaa/ <---username

http://bodyspace.bodybuilding.com/abams9/ <---username

I want to be able to harvest all the page and go to next page and to next page.

I think some how to see the page Source of the page and harvest it some how?

Thanks alot!

Edited by voidale

Share this post


Link to post
Share on other sites
Bert

Hey guys,

I'm new to autoit, I read like 3 pdfs I can understand the scripts and make something simple only 2 days trying to understand autoit2.

but to create it much more harder. I just need to know how exacly this can be done.

to harvest the ids from this page http://bodyspace.bodybuilding.com/members.php

the usernames you see them as "! ! ! ! aaaa" but when you mouse over there it's like http://bodyspace.bodybuilding.com/aaaa/ <---username

http://bodyspace.bodybuilding.com/abams9/ <---username

I want to be able to harvest all the page and go to next page and to next page.

I think some how to see the page Source of the page and harvest it some how?

Thanks alot!

The usernames wouldn't be in email format would they?

Share this post


Link to post
Share on other sites
voidale

@Volly what you mean there is no emails over there check it.

@athiwtc thanks man, not really sure where i find _INetGetSource

or the regx >_< is there maybe sample script that I can copy and edit?

Share this post


Link to post
Share on other sites
Valuater

I wish all people here would learn with Welcome to Autoit 1-2-3

Edited just a little...

$Check_String1 = '<a href="http://bodyspace.bodybuilding.com/'
$Check_String2 = '/" class="top_aligned_link">'



; demonstration to find chracters that change between to standard points
; or just find a string
#include <IE.au3>
#include <String.au3>

#Region --- IE-Builder generated code Start ---

$oIE = _IECreate()

;------------- User input --------------
_IENavigate($oIE, "http://bodyspace.bodybuilding.com/members.php") ; web address
$Find = '<a href="http://bodyspace.bodybuilding.com/'  ; my info shows after this line... or just find this line
$Find2 = '/">'  ; my info shows before this line... or set as ""
$Before = '<BR>'
; ------------ End User input -------------

Sleep(1000)
$body = _IEBodyReadHTML($oIE)
$sloc = @TempDir & "\stest.txt" 
FileDelete($sloc)
FileWrite($sloc, $body)
$sfile = FileOpen($sloc, 0)
$num = 0
While 2
    $num = $num + 1
    $sline = FileReadLine($sfile, $num)
    If @error Then
        FileClose($sfile)
        Exit
    EndIf
    If Not StringInStr($sline, "OVERFLOW") then ContinueLoop
    If StringInStr($sline, $Find) Then
        ;MsgBox(64, "Success", "The string " & $Find & " was found    " & @CRLF & " on line # " & $num & @CRLF & $sline, 5)
        If $Before = "" Then ExitLoop
        $Found = _StringBetween($sline, $Find2, $Before)
        If IsArray($Found) Then
        MsgBox(64, "Found", "The string is *" & $Found[0] & "*    ", 5)
        EndIf
    EndIf
WEnd

#EndRegion --- IE-Builder generated code End ---

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
voidale

I wish all people here would learn with Welcome to Autoit 1-2-3

Edited just a little...

$Check_String1 = '<a href="http://bodyspace.bodybuilding.com/'
$Check_String2 = '/" class="top_aligned_link">'



; demonstration to find chracters that change between to standard points
; or just find a string
#include <IE.au3>
#include <String.au3>

#Region --- IE-Builder generated code Start ---

$oIE = _IECreate()

;------------- User input --------------
_IENavigate($oIE, "http://bodyspace.bodybuilding.com/members.php") ; web address
$Find = '<a href="http://bodyspace.bodybuilding.com/'  ; my info shows after this line... or just find this line
$Find2 = '/">'  ; my info shows before this line... or set as ""
$Before = '<BR>'
; ------------ End User input -------------

Sleep(1000)
$body = _IEBodyReadHTML($oIE)
$sloc = @TempDir & "\stest.txt" 
FileDelete($sloc)
FileWrite($sloc, $body)
$sfile = FileOpen($sloc, 0)
$num = 0
While 2
    $num = $num + 1
    $sline = FileReadLine($sfile, $num)
    If @error Then
        FileClose($sfile)
        Exit
    EndIf
    If Not StringInStr($sline, "OVERFLOW") then ContinueLoop
    If StringInStr($sline, $Find) Then
        ;MsgBox(64, "Success", "The string " & $Find & " was found    " & @CRLF & " on line # " & $num & @CRLF & $sline, 5)
        If $Before = "" Then ExitLoop
        $Found = _StringBetween($sline, $Find2, $Before)
        If IsArray($Found) Then
        MsgBox(64, "Found", "The string is *" & $Found[0] & "*    ", 5)
        EndIf
    EndIf
WEnd

#EndRegion --- IE-Builder generated code End ---

8)

This is really great and working great thanks!

It popup with msg with the id, can it save on txt or something?

and go on to page 2 3 4 5 etc?

Share this post


Link to post
Share on other sites
voidale

I can Pay somebody to do this for me if you know how!

Share this post


Link to post
Share on other sites
Jos

please stop bumping and start putting in some effort yourself.

Come back when you have followed the suggested "Welcome to AutoIt3" training and seriously looked at it yourself.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
voidale

anybody willing to do this I will pay?

Share this post


Link to post
Share on other sites
voidale

Come on no one wanna code it for money?

Share this post


Link to post
Share on other sites
Scriptonize

Come on no one wanna code it for money?

Nope.

Time to start working yourself.


If you learn from It, it's not a mistake

Share this post


Link to post
Share on other sites
Jos

Come on no one wanna code it for money?

Which part of my post was unclear to you?

I am closing this and better not start a new topic.

*click*


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.