Jump to content

Recommended Posts

Posted (edited)

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
Posted

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?
Posted

@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?

Posted (edited)

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

Posted

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?

  • Developers
Posted

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...