nikitanova Posted October 11, 2010 Posted October 11, 2010 Guys and GalsPlease 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
wakillon Posted October 11, 2010 Posted October 11, 2010 Try with .innertext ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
nikitanova Posted October 11, 2010 Author Posted October 11, 2010 Excellent! Many thanks! I feel like kissing you. BTW, Do you know where I can find a list of all available properties like that?
wakillon Posted October 11, 2010 Posted October 11, 2010 Excellent! Many thanks!I feel like kissing you.BTW, Do you know where I can find a list of all available properties like that?Thanks !And you can find in IE.au3 ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
nikitanova Posted October 11, 2010 Author Posted October 11, 2010 I see. Never thought it'd be inside there! I already had the information but didn't know where to look! Anyway, thanks again!
wakillon Posted October 11, 2010 Posted October 11, 2010 I see. Never thought it'd be inside there! I already had the information but didn't know where to look!Anyway, thanks again!Windows search is one of my friend ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
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