找回密码
 加入
搜索
查看: 2156|回复: 1

[IE类操作] 如何得到网页所有链接?

[复制链接]
发表于 2014-6-6 19:40:09 | 显示全部楼层 |阅读模式

#include <ie.au3>
;$oie=_IECreate("http://www.sciencedirect.com/science/article/pii/B9780122841514500002",1,1,1,0)
$oie=_IECreate("http://bloodjournal.hematologylibrary.org/cgi/pmidlookup?view=long&pmid=19433859",1,1,1,0)
;;;;;;;;;http://bloodjournal.hematologyli ... .long?sso-checked=1
;$oie=_IECreate("http://www.baidu.com",1,1,1,0)
_IELoadWait($oie)
$links=_IELinkGetCollection($oie)
$url= _IEPropertyGet($oIE,"locationurl")
MsgBox(0,0,$url)

;IF StringInStr($url,"bloodjournal.hematologylibrary.org") Then

For $link In $links
       ; If StringLower($link.id)="highwire_article_tabs" Then
                MsgBox(0,"",$link.href)
        ;        ExitLoop
        ;EndIf
Next

这个$link.href怎么处理,怎么写入数组,$links=_IELinkGetCollection($oie)这个$links本身不是数组吗?怎么转化呢?
 楼主| 发表于 2014-6-6 19:47:00 | 显示全部楼层
忘记说了,还想得到这些所有的每一个链接所对应的其它信息,比较id class name等,一同写入数组?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-4 21:30 , Processed in 0.075944 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表