Jump to content

IE Functions question


Recommended Posts

Guys and Gals

Please help me a bit in here. I'm trying to extract information from a set of link.

The basic structure of the "a" element - <a href="LINK">TEXT</a>

I want the "TEXT" portion of the collection. Just in the following code, I've been extracting the link with the .href property. But which property gets me the Text?

#include <IE.au3>
#include <Array.au3>
$oIE = _IECreate("http://www.songs.pk/parineeta.html")
$oLinks = _IELinkGetCollection($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
Global $linkArray[$iNumLinks*2 + 1]
Global $count
For $oLink In $oLinks
    ;MsgBox(0, "Link Info", $oLink.href)
    If StringInStr($oLink.href, "http://link.songs.pk/song.php?songid=") Then
        $count = $count + 2
        $linkArray[$count] = $oLink.href
        $linkArray[$count+ 1] = $oLink ;<------HERE IS THE PROBLEM
    EndIf
Next

_ArrayDisplay($linkArray)

;http://www.songs.pk/indian/pocket_maar_1974.html
;http://link.songs.pk/song.php?songid=2080
Link to comment
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
 Share

  • Recently Browsing   0 members

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