Jump to content
Sign in to follow this  
Kyme

IE read link help

Recommended Posts

Kyme

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 by Kyme

Share this post


Link to post
Share on other sites
Kyme

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

Share this post


Link to post
Share on other sites
Kyme

i have made it...tnx to Valuater for his code :D

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

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  

×

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.