Sign in to follow this  
Followers 0
pecha

URL doubts

4 posts in this topic

exists some possibility to change the URL with some function to only modify the numeration ( in red ) of the pages, like: /101/1.html ; /102/1.html ;

/103/1.html ; /104/1.html ; /105/1.html ; /106/1.html ; /107/1.html ;?

#include <IE.au3>

$sImgDir = "c:\POP\"

$sWebPage = "http://qualquercoisa.pt/picture/100/1.html"; webpage with images

I tried something as but without results

Do

$i = X + 1

Until X = 200

Share this post


Link to post
Share on other sites



Try this:

#include <IE.au3>

$oIE = _IECreate()
$sImgDir = "c:\POP\"

For $i = 1 To 200
    _IENavigate($oIE, "http://qualquercoisa.pt/picture/" & $i & "/1.html")
    $oIMGs = _IEImgGetCollection($oIE)
    ; Loop through all IMG tags and save file to local directory using INetGet
    For $oIMG In $oIMGs
        $sImgUrl = $oIMG.src
        $sImgFileName = $oIMG.nameProp
        InetGet($sImgUrl, $sImgDir & $sImgFileName)
    Next
Next

Share this post


Link to post
Share on other sites

Thanks big_daddy.

one more question, I can make this ( in red ) is possivel?

$oIE = _IECreate()

$sImgDir = "c:\POP\"

For $i = 001 To 200 ; 001 , 002, 003, to 200

_IENavigate($oIE, "http://qualquercoisa.pt/picture/" & $i & "/1.html")

$oIMGs = _IEImgGetCollection($oIE)

; Loop through all IMG tags and save file to local directory using INetGet

For $oIMG In $oIMGs

$sImgUrl = $oIMG.src

$sImgFileName = $oIMG.nameProp

InetGet($sImgUrl, $sImgDir & $sImgFileName)

Next

Thanks

Share this post


Link to post
Share on other sites

Try this:

#include <IE.au3>

$oIE = _IECreate()
$sImgDir = "c:\POP\"

For $i = 1 To 200
    Switch $i
        Case 0 To 9
            $i = "00" & $i
        Case 10 To 99
            $i = "0" & $i
    EndSwitch
    _IENavigate($oIE, "http://qualquercoisa.pt/picture/" & $i & "/1.html")
    $oIMGs = _IEImgGetCollection($oIE)
    ; Loop through all IMG tags and save file to local directory using INetGet
    For $oIMG In $oIMGs
        $sImgUrl = $oIMG.src
        $sImgFileName = $oIMG.nameProp
        InetGet($sImgUrl, $sImgDir & $sImgFileName)
    Next
Next

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  
Followers 0