2016-09-11 30 views
-1

作業中のプロセスを自動化したい。私は以下のような特定の単語から始まる約20〜30のリンクを持つウェブページを持っています。HTMLページからリンクを取得する

abc1234 
abc5142 
abc9862 
abc3621

これらの行は、基本的にリンクです。クリックすると、IPを持つもう1つのブラウザが表示されます。

ここで、各マシン名の背後にあるIP(ex:abc6901)を知りたいので、VNCビューアを使用してそれらのマシンに接続したいと思います。

Dim Browser, strOut 
Set Browser = CreateObject("InternetExplorer.Application") 
With Browser 
    .Visible = False 
    .Navigate "http://anees.amoeba.co.in/table.html" 
    'Wait for Browser 
    Do While .Busy 
    WScript.Sleep 100 
    Loop 
End With 

しかし、同じことを試みたときに、.vbsスクリプトファイルを使用してHTMLページからリンクの詳細を取得できませんでした。私は同じことを得ることに取り組み、私は方法document.getElementByIdとリンクの詳細を取得するいくつかの他の方法に立ち往生していることがわかりました。

また、これらのリンクがWebページ上に存在するノードの情報を取得する方法もわかりません。理解を深めるため、私は自分のページのスクリーンショットをアプリケーションから貼り付けます。

enter image description here

+0

あなたのウェブページの構造を知らないうちにあなたを助けることはできません。ソースはどのように見えますか?タスクリストはどのように作成されますか?サーバー側で? JavaScript経由でクライアント側で? Javaアプレット経由でクライアント側で?いくつかの他のプラグイン? –

+0

ええ、私のいくつかのより多くの研究は私のような - Adob​​e Flash Playerアプレットのように私に言った。あなたが求めている構造 - どこで入手できますか? –

+0

私はあなたがFlashのページからコンテンツを抽出できるとは思わない。 –

答えて

0

のInternet Explorer 5電源おもちゃは、リストのリンクプログラムが含まれます。

このREGファイルを実行してインストールするにはC:\Windows\WEB\urllist.htm

<script language=javascript defer> 
var str = new String ("toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, resizable=yes, top=0, left=0, width=400, height="); 

str = str + (screen.height - 100); 

//alert (screen.height); 

var dlProgress = window.open ("", "linkdownloader", str); 

dlProgress.document.open(); 
dlProgress.document.writeln ("<html>"); 
dlProgress.document.writeln ("<head>"); 
dlProgress.document.writeln ("<title>Links list</title>"); 
dlProgress.document.writeln ("</head>"); 
dlProgress.document.writeln ("<body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>"); 
dlProgress.document.writeln ("<font style=\"font: 8pt Verdana, Arial, Helvetica, Sans-serif; line-height:18pt;\">"); 
dlProgress.document.writeln ("<script language=javascript>function navigateClose(str){if (document.my_parent != null){document.my_parent.location.href=str;window.close();}else{alert(\"Please wait until the list has populated.\");}}<\/script>"); 

dlProgress.document.writeln ("&nbsp;List of all links in <b>" + external.menuArguments.document.title + "</b>:<ol>"); 
var links = external.menuArguments.document.links; 
for (i = 0; i < links.length; i++) 
{ 
    if (links(i).innerText != "" && links(i).innerText != " ") 
    { 
     dlProgress.document.writeln ("<li><A HREF='javascript:navigateClose(\"" + links(i).href + "\")' TITLE=" + links(i).href + ">" + links(i).innerText + "</a><BR>"); 
    } 
    else 
    { 
     dlProgress.document.writeln ("<li><A HREF='javascript:navigateClose(\"" + links(i).href + "\")'>" + links(i).href + "</a><BR>"); 
    } 
} 
dlProgress.document.writeln ("</ol><center><a href='javascript:window.close()' style=\"color:#FF0000;text-decoration:none\">close</a></center><BR></body>"); 
dlProgress.document.writeln ("</font></html>"); 
dlProgress.document.close(); 

dlProgress.document.my_parent = external.menuArguments; 
</script> 

次のhtmページを作成します。

Windows Registry Editor Version 5.00 

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\MenuExt\&Links List] 
@="C:\\Windows\\WEB\\urllist.htm" 
"contexts"=hex:01 

右クリックページを使用してリンクリストを選択します。

関連する問題