Ⅰ 如何批量提取網頁鏈接地址

可以網路搜索下,lmcjl在線工具,裡面有一個可以提取全站鏈接地址的在線工具,無需下載。你可以試試。

Ⅱ 八爪魚採集器採集網頁多個鏈接求指點 謝謝

步驟:

  1. 建立一個循環點擊的列表:右鍵點擊頁面中的中第一個寶貝,選擇創建一個列表,將其添加到列表中,選擇繼續添加元素,再點擊另外一個寶貝,頁面中的所有寶貝將會被添加到列表中,最後點擊完成列表創建就可以了。

  2. 提取頁面內寶貝的鏈接和標題:完成點擊列表的創建後,左側會生成的一個循環點擊框,

    點擊框里的點擊元素,進入寶貝的詳情頁,右鍵點擊想要提取的內容,網頁的標題和鏈接在右側的操作框左下角可以添加。

備注:不知道怎麼創建規則的可以到八爪魚的規則市場下載現成的採集規則就可以進行採集了

Ⅲ 怎麼採集網頁中所有的我想要的視頻鏈接

八爪魚可以批量採集網頁中視頻的下載地址;再使用網頁視頻下載器下載視頻。

網頁中視頻url採集

創建翻頁循環

進入採集規則設置界面,將視頻網站的URL輸入到地址欄,如圖點擊右側的按鈕,

在八爪魚採集器的內置瀏覽器中打開該網頁

將視頻URL導出後,使用視頻URL批量下載工具將視頻下載出來就完成了。

Ⅳ ASP採集,如何採集一個網頁里 其它的連接的網頁的內容。

輸出顯示函數即可,也可以將變數存入資料庫,這只是一個例子,具體其它功能你舉一反三,循環以下即可。
response.write Showipinfo("202.29.90.9")

Function Showipinfo(ip)
'顯示IP地址具體地址 參考IP138資料庫
Dim urls,str,showipinfos
urls="http://www.ip138.com/ips138.asp?ip="&ip&"&action=2"
str =getHTTPPage(urls)
Showipinfo=strcut(str,"<ul class=""ul1"">","</ul>",2) '截取IP地址來源
showipinfos = Replace(Showipinfo,"本站主數據:","1、")
Showipinfo = Replace(showipinfos,"參考數據一:","2、")
End Function

'****************************************
'
'函數名:GetHttpPage(url) 2011-5-17 xuyang
'功 能:ASP採集網頁內容 GB2312 和 UTF-8 通用
'參 數:url地址
'****************************************
Function GetHttpPage(url)
Dim ResStr, ResBody, PageCode
If IsNull(url) = True Or url = "False" Then
GetHttpPage = ""
Exit Function
End If
Dim Http, sStartTime
Set Http = Server.CreateObject("MSXML2.XMLHTTP")
With Http
.Open "GET", url, False
.Send
End With
'Http.open "GET", url, False
'Http.Send (Null)
sStartTime = Now
On Error Resume Next
If Http.Status <> 200 Then
Set Http = Nothing
GetHttpPage = ""
Exit Function
End If
Do While Http.ReadyState <> 4
If DateDiff("s", sStartTime, Now) > 10 Then
GetHttpPage = ""
Exit Function
End If
Loop
If Http.ReadyState = 4 Then
If Http.Status = 200 Then
PageCode = test(url)
GetHttpPage = bytesToBSTR(Http.responseBody, PageCode)
End If
End If
Set Http = Nothing
If Err.Number <> 0 Then
Err.Clear
End If
End Function
Function bytesToBSTR(body, Cset)
Dim Objstream
Set Objstream = CreateObject("adodb.stream")
Objstream.Type = 1
Objstream.Mode = 3
Objstream.Open
Objstream.write body
Objstream.position = 0
Objstream.Type = 2
Objstream.Charset = Cset
bytesToBSTR = Objstream.Readtext
Objstream.Close
Set Objstream = Nothing
End Function
Function test(sUrl)
Dim ox
Set ox = server.CreateObject("msxml2.xmlhttp")
ox.Open "get", sUrl, False
ox.Send
test = charsetOf(ox.responseBody)
End Function
Function charsetOf(bstr)
Dim p, c, r
If InStrB(bstr, ChrB(0)) > 0 Then
charsetOf = "unicode"
Exit Function
End If
c = s2b("charset=")
p = InStrB(1, bstr, c, 1)
If p > 0 Then
c = b2s(MidB(bstr, p + LenB(c), 20))
Set r = New RegExp
r.Pattern = "^[』""]?([-\w]+)"
Set c = r.Execute(c)
If c.Count > 0 Then
charsetOf = LCase(c(0).SubMatches(0))
Exit Function
End If
End If
Dim n, ucsOnly, ret
ucsOnly = False
n = LenB(bstr)
For p = 1 To n
c = AscB(MidB(bstr, p, 1))
If c And &H80 Then Exit For
If c < &H20 Then
If c <> &HD And c <> &HA And c <> &H9 Then
ucsOnly = True
Exit For
End If
End If
Next
If p > n Then
ret = "ascii"
ElseIf Not ucsOnly Then
If isUtf8(bstr, p, n) Then
ret = "utf-8"
ElseIf isGbk(bstr, p, n) Then
ret = "GB2312"
End If
End If
If IsEmpty(ret) Then
If isUnicode(bstr, p, n) Then
charsetOf = "unicode"
Else
charsetOf = "unknown"
End If
Else
charsetOf = ret
End If
End Function
Function s2b(str)
Dim r, i
For i = 1 To Len(str)
r = r + ChrB(Asc(Mid(str, i, 1)) And &HFF)
Next
s2b = r
End Function
Function b2s(bs)
Dim r, i
For i = 1 To LenB(bs)
r = r + Chr(AscB(MidB(bs, i, 1)))
Next
b2s = r
End Function
Function isUtf8(bs, start, Length)
isUtf8 = True
Dim p, e, c
e = False
For p = start To Length
c = AscB(MidB(bs, p, 1))
If c And &H80 Then
If c And &HE0 = &HC0 Then
If p = Length Then
e = True
Else
p = p + 1
If AscB(MidB(bs, p, 1)) And &H30 <> &HC0 Then e = True
End If
ElseIf c And &HF0 = &HE0 Then
If p = Length Or p = Length - 1 Then
e = True
Else
p = p + 2
If AscB(MidB(bs, p - 1, 1)) And &H30 <> &HC0 Then
e = True
ElseIf AscB(MidB(bs, p, 1)) And &H30 <> &HC0 Then
e = True
End If
End If
Else
e = True
End If
End If
If e Then
isUtf8 = False
Exit Function
End If
Next
End Function
Function isGbk(bs, start, Length)
isGbk = True
Dim p, e, c
e = False
For p = start To Length
c = AscB(MidB(bs, p, 1))
If c And &H80 Then
If p = Length Then
e = True
Else
p = p + 1
If (AscB(MidB(bs, p, 1)) And &H80) = 0 Then e = True
End If
End If
If e Then
isGbk = False
Exit Function
End If
Next
End Function
Function isUnicode(bs, start, Length)
isUnicode = True
Dim p, c
If start Mod 2 = 0 Then
isUnicode = False
Exit Function
End If
For p = start To Length
c = AscB(MidB(bs, p, 1))
If c And &H80 Then
If p = Length Then
isUnicode = False
Exit Function
Else
p = p + 1
End If
End If
Next
End Function
'截取字元串,1.包括起始和終止字元,2.不包括
Function strCut(strContent,StartStr,EndStr,CutType)
Dim strhtml,S1,S2
strHtml = strContent
On Error Resume Next
Select Case CutType
Case 1
S1 = InStr(strHtml,StartStr)
S2 = InStr(S1,strHtml,EndStr)+Len(EndStr)
Case 2
S1 = InStr(strHtml,StartStr)+Len(StartStr)
S2 = InStr(S1,strHtml,EndStr)
End Select
If Err Then
strCute = "<p align=』center』>沒有找到需要的內容。</p>"
Err.Clear
Exit Function
Else
strCut = Mid(strHtml,S1,S2-S1)
End If
End Function

Ⅳ 如何抓取一個網址下的所有頁面鏈接

由於題目是放在【編程語言】欄目下的,但沒有指定希望使用哪種編程語言,我選擇使用java語言來實現。

在Java中,使用HttpURLConnection即可連接URL,隨後可以使用InputStreamReader獲取網頁內容文本。然後,使用正則表達式解析網頁內容文本,找到所有的<a>標簽即實現需求。

以下是詳細代碼

importjava.io.BufferedReader;
importjava.io.IOException;
importjava.io.InputStreamReader;
importjava.net.HttpURLConnection;
importjava.net.URL;
importjava.util.ArrayList;
importjava.util.regex.Matcher;
importjava.util.regex.Pattern;
publicclassHtmlParser{
/**
*要分析的網頁
*/
StringhtmlUrl;
/**
*分析結果
*/
ArrayList<String>hrefList=newArrayList();
/**
*網頁編碼方式
*/
StringcharSet;
publicHtmlParser(StringhtmlUrl){
//TODO自動生成的構造函數存根
this.htmlUrl=htmlUrl;
}
/**
*獲取分析結果
*
*@throwsIOException
*/
publicArrayList<String>getHrefList()throwsIOException{
parser();
returnhrefList;
}
/**
*解析網頁鏈接
*
*@return
*@throwsIOException
*/
privatevoidparser()throwsIOException{
URLurl=newURL(htmlUrl);
HttpURLConnectionconnection=(HttpURLConnection)url.openConnection();
connection.setDoOutput(true);
Stringcontenttype=connection.getContentType();
charSet=getCharset(contenttype);
InputStreamReaderisr=newInputStreamReader(
connection.getInputStream(),charSet);
BufferedReaderbr=newBufferedReader(isr);
Stringstr=null,rs=null;
while((str=br.readLine())!=null){
rs=getHref(str);
if(rs!=null)
hrefList.add(rs);
}
}
/**
*獲取網頁編碼方式
*
*@paramstr
*/
privateStringgetCharset(Stringstr){
Patternpattern=Pattern.compile("charset=.*");
Matchermatcher=pattern.matcher(str);
if(matcher.find())
returnmatcher.group(0).split("charset=")[1];
returnnull;
}
/**
*從一行字元串中讀取鏈接
*
*@return
*/
privateStringgetHref(Stringstr){
Patternpattern=Pattern.compile("<ahref=.*</a>");
Matchermatcher=pattern.matcher(str);
if(matcher.find())
returnmatcher.group(0);
returnnull;
}
publicstaticvoidmain(String[]arg)throwsIOException{
HtmlParsera=newHtmlParser("http://news.163.com/");
ArrayList<String>hrefList=a.getHrefList();
for(inti=0;i<hrefList.size();i++)
System.out.println(hrefList.get(i));
}
}

Ⅵ 怎麼採集一個網站的所有鏈接

下載一個信息採集器,就是站長下載,可以下載整個網站的內容,包括視頻,音樂,圖片,不過程序類型的就下載不到了,網址的鏈接肯定會下載到的

Ⅶ 如何提取網頁中所有鏈接

Sitemap 全站鏈接抓取 URL採集工具 - SEO

url採集提取