Kyme Posted April 1, 2009 Posted April 1, 2009 (edited) hi all...i need lot of help with this one, can anybody give me some tip or show me how i can copy all links from every artist like in my script...i made to make only for 1 artist and i stuck overhere...i don't know how to make it to msg me all artist links can anybody please help me? thank you $oIE = _IECreate ("http://www.mtv.com/music/artists/browse.jhtml?chars=a", 1, 1, 0) _IELoadWait($oIE) read() Func read() Local $Link, $linkURL, $links = $oIE.document.links For $Link In $links $linkURL = $Link.href If StringInStr($linkURL, "http://www.mtv.com/music/artist/") Then MsgBox(0,"",$linkURL) EndIf Next EndFunc Edited April 1, 2009 by Kyme
Kyme Posted April 1, 2009 Author Posted April 1, 2009 ok i made this think with links...now what i don't know it's how to add below each link artist name #include <IE.au3> $oIE = _IECreate ("http://www.mtv.com/music/artists/browse.jhtml?chars=a", 1, 1, 0) _IELoadWait($oIE) read() Func read() Local $Link, $linkURL, $links = $oIE.document.links For $Link In $links $linkURL = $Link.href If StringInStr($linkURL, "http://www.mtv.com/music/artist/") Then ConsoleWrite($linkURL&@CRLF) EndIf Next $links = $oIE.document.links For $Link In $links $linkURL = $Link.href Next EndFunc
Kyme Posted April 1, 2009 Author Posted April 1, 2009 i have made it...tnx to Valuater for his code little moded...but it's all most from valuater code from here #include <IE.au3> #include <String.au3> $Find = '<a href="/music/artist' $Before = "</a>" $sloc = @ScriptDir & "\all.txt" $sfile = FileOpen($sloc, 0) $num = 0 read() Func read() While 1 $num = $num + 1 $sline = FileReadLine($sfile, $num) If StringInStr($sline, $Find) Then $Found = _StringBetween($sline, $Find, $Before) MsgBox(64, "Found",$Found[0]) ConsoleWrite("http://www.mtv.com/music/artist"&$Found[0]&@CRLF) read() EndIf WEnd EndFunc
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