午夜国产狂喷潮在线观看|国产AⅤ精品一区二区久久|中文字幕AV中文字幕|国产看片高清在线

    百度空間備份腳本baidublogbak.vbs代碼分析
    來源:易賢網(wǎng) 閱讀:1439 次 日期:2016-07-21 14:22:53
    溫馨提示:易賢網(wǎng)小編為您整理了“百度空間備份腳本baidublogbak.vbs代碼分析”,方便廣大網(wǎng)友查閱!

    '用法示例:

    'cscript bak.vbs 百度用戶名 第I頁 至第n頁 目錄列表.htm 用戶名 密碼

    '例如我的blgo示例:

    'cscript baidublogbak.vbs myvbscript 0 3 url.htm myvbscript mima

    '表示從第0頁備份到第3頁,blog的共有頁數(shù)打開http://hi.baidu.com/用戶名/blog/index/0就可以看到了。url.htm存放的是目錄列表

    '注意的是百度是從0頁計數(shù)的

    '如果用戶名和密碼隨便寫也可以備份,但是無法備份私有文檔

    '推薦幾頁幾頁備份,最好建單獨一個目錄將bak.vbs放進去,會在當(dāng)前目錄生成mht文檔。因為有的網(wǎng)絡(luò)原因,有的無法成mht,請對照url.htm目錄列表檢查

    '====================================================================================================

    On Error Resume next

    if (lcase(right(wscript.fullname,11))="wscript.exe") then

    wscript.echo "Execute it under the cmd.exe Plz! Thx."

    wscript.quit

    end if

    Const adSaveCreateNotExist = 1

    Const adSaveCreateOverWrite = 2

    Const adTypeBinary = 1

    Const adTypeText = 2

    Set args = WScript.Arguments

    if args.Count = 0 then

    WScript.Echo "Usage: CScript baidublogbak.vbs blogname i n url.htm username password"

    WScript.Quit 1

    end If

    Set objMessage = CreateObject("CDO.Message")

    Set ie=WScript.CreateObject("InternetExplorer.Application")

    ie.visible=true

    ie.navigate "http://passport.baidu.com/?login"

    Do

    Wscript.Sleep 200

    Loop Until ie.ReadyState=4

    ie.document.getElementById("username").value=args.Item(4)

    ie.document.getElementById("password").value=args.Item(5)

    tj=ie.document.getElementsBytagname("form")

    tj.submit

    WScript.Sleep 10000

    Sub SaveToFile(Msg, Fn)

    Dim Strm, Dsk

    Set Strm = CreateObject("ADODB.Stream")

    Strm.Type = adTypeText

    Strm.Charset = "gb2312"

    Strm.Open

    Set Dsk = Msg.DataSource

    Dsk.SaveToObject Strm, "_Stream"

    Strm.SaveToFile Fn, adSaveCreateOverWrite

    End Sub

    For n=args.Item(1) To args.Item(2) Step 1

    url="http://hi.baidu.com/"&args.Item(0)&"/blog/index/"&n

    ie.Navigate url

    ie.visible=false

    While ie.Busy

    WScript.Sleep 100

    Wend

    Do

    Wscript.Sleep 200

    Loop Until ie.ReadyState=4

    wscript.echo "正保存第"&n&"頁"

    Wscript.Sleep 3000

    For i=0 To ie.Document.links.length-1

    If InStrRev(ie.Document.links(i).href,"blog/item/",-1,1)<> 0 And InStrRev(ie.Document.links(i).innerText,"瀏覽",-1,1)= 0 And InStrRev(ie.Document.links(i).href,"#comment",-1,1)= 0 And InStrRev(ie.Document.links(i).href,"cmtid",-1,1)= 0then

    wscript.echo ie.Document.links(i).href &"||"&ie.Document.links(i).innerText

    CreateObject("Scripting.FileSystemObject").OpenTextFile(args.Item(3),8,True,0).WriteLine(ie.Document.links(i).href &"||"&ie.Document.links(i).innerText)

    objMessage.CreateMHTMLBody ie.Document.links(i).href

    SaveToFile objMessage, ie.Document.links(i).innerText&".mht"

    End if

    Next

    next

    ie.quit

    Set ie=nothing

    更多信息請查看腳本欄目
    易賢網(wǎng)手機網(wǎng)站地址:百度空間備份腳本baidublogbak.vbs代碼分析
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

    2025國考·省考課程試聽報名

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號
    云南網(wǎng)警備案專用圖標(biāo)
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
    云南網(wǎng)警報警專用圖標(biāo)