Sign in to follow this  
Followers 0
iamtheky

_IE capturing links

4 posts in this topic

#1 ·  Posted (edited)

http://technet.microsoft.com/en-us/security/Bulletin/MS12-048

using this site as an example. I would like to capture the link in the table with the text: "Windows 7 for x64-based Systems Service Pack 1"

link being: http://www.microsoft.com/downloads/details.aspx?familyid=f518f273-b3b9-4cbf-b820-05a1adc79342

I have attempted using tablegetcollection and linkgetcollection, both offer great solutions for either getting the text or the link, but neither are offering readily apparent solutions to determine the underlying link behind that text.

Hopefully it turns out to be hella simple and i look like a tard.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites



#include <IE.au3>
$oIE = _IECreate("http://technet.microsoft.com/en-us/security/Bulletin/MS12-048")
$oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
    If StringInStr($oLink.innerText, "Windows 7 for x64-based Systems Service Pack 1") Then
        ConsoleWrite($oLink.innerText & @TAB & $oLink.href & @CRLF)
        ExitLoop
    EndIf
Next
_IEQuit($oIE)

Share this post


Link to post
Share on other sites

ty sir, i certainly need to educate myself on the info available via the object.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Check out MSDN.

Edit: This is a better link.

Edited by GMK

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  
Followers 0