返回列表 上一主題 發帖

[發問] 請問如何捉取網頁內全部圖片的網止

[發問] 請問如何捉取網頁內全部圖片的網止

請問如何捉取網頁內全部圖片的網指


例如
http://blog.mjjq.com/archives/1975.html

的


.
.
.
.


謝謝

jakcy1234  cji3cj6xu6  大大,謝謝您們
我是想用
CreateObject("InternetExplorer.Application")
是如何用
以後要用在程式中
例如 取得
http://xxx.xxx.xxx/........../a.xls
http://xxx.xxx.xxx/..../.../.....o.zip
各種檔案等
謝謝

TOP

謝謝 G大
不知 CreateObject("Microsoft.XMLHTTP") 可以
G大您好
是不是我的系統的問題,執行時有以下的錯誤,請G大指點
謝謝

2013-09-10_171722.jpg (31.61 KB)

2013-09-10_171722.jpg

2013-09-10_171804.jpg (105.5 KB)

2013-09-10_171804.jpg

test.rar (10.66 KB)

TOP

請問G大,是不是
.Pictures.Insert (.Cells(i, 2))
的問題
我註解了,就可執行
謝謝

Option Explicit
Sub 下載網路照片()
    Dim a As Variant, e As Integer, i As Integer, s As Variant, p As Integer
    With CreateObject("Microsoft.XMLHTTP")
        .Open "get", "http://blog.mjjq.com/archives/1975.html", False
       .send
       a = Split(.responseText, vbLf)
    End With
    With ActiveSheet
        .Pictures.Delete
        .Cells.Clear
        i = 1
        For e = 0 To UBound(a)
            If InStr(a(e), "src=""http://") And InStr(a(e), ".jpg"" /><br />") Then
                s = Split(a(e), "alt=""")(1)
                s = Split(s, """ width=""")(0)
                .Cells(i, 1) = s
                s = Split(a(e), "src=""")(1)
                s = Split(s, """ /><br />")(0)
                .Cells(i, 2) = s
                p = .Pictures.Count
                .Cells(1 + (p * 20), "H").Select
              '  .Pictures.Insert (.Cells(i, 2))
                i = i + 1
            End If
       Next
    End With
End Sub

TOP

請問G大是不是圖檔太大
我的電腦不能跑

2013-09-10_174329.jpg (155.77 KB)

2013-09-10_174329.jpg

TOP

謝謝
G大
stillfish00 大
我的也是2010改了就能RUN
是不是2010版的蟲
謝謝 ^0^

2013-09-10_200706.jpg (177.26 KB)

2013-09-10_200706.jpg

TOP

本帖最後由 wufonna 於 2013-9-12 13:16 編輯

請問如宣告字串
<meta name="description" content="提供最方便的網站搜尋、即時新聞、生活資訊和Yahoo奇摩服務入口。">

===========================
Sub TEST()

Dim s As String
s = "<meta name="description" content="提供最方便的網站搜尋、即時新聞、生活資訊和Yahoo奇摩服務入口。">"
End Sub
錯誤
謝謝

TOP

請問G大
split 後面的(1)是刪字元前的全部
(0)刪字元後的全部嗎
謝謝

Sub Ex()
    Dim s As String, i, ss As String
    s = """"
    MsgBox s
    s = "A &   ""   &   B"
    MsgBox s
    s = "<meta name=""description"" content=""提供最方便的網站搜尋、即時新聞、生活資訊和Yahoo奇摩服務入口。"">"
    MsgBox s
    s = Split(s, "content=""")(1)
    MsgBox s
    s = Split(s, """>")(0)
    MsgBox s
End Sub

TOP

非常謝謝 G 大 ^_^
學生很多問題 /___\
網頁內很多樣式的標籤
可用這樣的方法,還是有什麼方便的方法
Sub test()
Dim a, b, c, d

a = "<img src=""http://l.yimg.com/ud/hp_editor/tw/13/09/12/15/130asf302-190c8a5.jpg"" alt=""Video 圖片"" width=160 height=115><br>"
b = "<img src=""http://l.yimg.com/ud/hp_editor/tw/13/09/12/15/asf912151302190c8a35.jpg"" ></p>"
c = "<img src=""http://l.yimg.com/ud/hp_editor/tw/13/09/12/15/130f302-19c8a35.jpg"" alt=""Video 圖片"" height=115><br />"
d = "<img width=160 height=115 src=http://l.yimg.com/ud/hp_editor/tw/13/09/12/15/13092151302190c8a35.jpg  ></a>"
a = Split(a, "http://")(1)
a = Split(a, ".jpg")(0)
a = "http://" & a & ".jpg"
b = Split(b, "http://")(1)
b = Split(b, ".jpg")(0)
b = "http://" & b & ".jpg"
c = Split(c, "http://")(1)
c = Split(c, ".jpg")(0)
c = "http://" & c & ".jpg"
d = Split(d, "http://")(1)
d = Split(d, ".jpg")(0)
d = "http://" & d & ".jpg"
MsgBox a & Chr(10) & b & Chr(10) & c & Chr(10) & d

End Sub
謝謝

TOP

謝謝  G 大
excel 內的好多函數就學不完,^_^
要多多的練習,
非常感謝 G 大

TOP

        靜思自在 : 手心向下是助人,手心向上是求人;助人快樂,求人痛苦。
返回列表 上一主題