pecha Posted April 6, 2007 Share Posted April 6, 2007 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 imagesI tried something as but without results Do $i = X + 1Until X = 200 Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 6, 2007 Moderators Share Posted April 6, 2007 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 Link to comment Share on other sites More sharing options...
pecha Posted April 8, 2007 Author Share Posted April 8, 2007 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) NextThanks Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 9, 2007 Moderators Share Posted April 9, 2007 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now