To share with you. A little transformation can achieve more powerful functions.
Use the following Code You can export the external links of the Picasa album in batches.
Copy code The Code is as follows: <% @ Language = "VBScript" codePage = "65001" %>
<%
Dim xmlget, XMLHTTP, email, paswd
Email = "youremail" 'enter the Picasa account email
Paswd = "yourpassword" 'enter the password of Picasa
Set XMLHTTP = Createobject ("msxml2.serverxmlhttp ")
With XMLHTTP
. Open "get", "https://www.google.com/accounts/ServiceLoginAuth? Service = lh2 & continue = http://picasaweb.google.com/lh/login? Continue = http % 3A % 2f %
2fpicasaweb.google.com % 2 fhome & ltmpl = GP & H1 = zh_cn & galx = ip37cq7cgwe & Email = "& Email &" & passwd = "& paswd, false
'. SetRequestHeader "Content-Type", "application/X-WWW-form-urlencoded"
. Send ""
Xmlget = getredirect (bin2str (. responsebody ))
. Open "get", xmlget
. Send ""
Xmlget = bin2str (. responsebody)
If request ("type") = "photo" then
. Open "get", request ("url ")
. Send ""
Xmlget = bin2str (. responsebody)
Xmlget = Replace (xmlget, "PWA. Setup", "Test2 ")
Else
Xmlget = Replace (xmlget, "PWA. Setup", "test ")
End if
End
Set XMLHTTP = nothing
Function bin2str (binstr)
Const adtypebinary = 1
Const adtypetext = 2
Dim bytesstream, stringreturn
Set bytesstream = server. Createobject ("ADODB. Stream ")
With bytesstream
. Type = adtypetext
. Open
. Writetext binstr
. Position = 0
. Charset = "UTF-8"
. Position = 2
Stringreturn =. readtext
. Close
End
Set bytesstream = nothing
Bin2str = stringreturn
End Function
Function getredirect (STR)
STR = mid (STR, instr (STR, "location. Replace "))
STR = mid (STR, 19, instr (STR, ")")-19)
STR = Replace (STR, "\ X3D", "= ")
Getredirect = Replace (STR, "\ X26 ","&")
End Function
%>
<%
If request ("type") <> "photo" then
%>
[I]. URL) + "'>" + albums [I]. title + "</a> </LI> <br/> ";
HTML + = "</ul> ";
Document. Body. innerhtml = HTML;
}
// --> </SCRIPT>
<%
Else
%>
<Script language = "JavaScript"> <! --
Function Test2 ()
{
If (arguments. length! = 15)
Return;
VaR html = "<ul> ";
VaR photoes = arguments [6]. feedpreload. Feed. entry;
For (VAR I = 0; I <photoes. length; I ++)
HTML + = "<li>" + photoes [I] ["content $ SRC"] + "</LI> ";
HTML + = "</ul> ";
Document. Body. innerhtml = HTML;
}
// --> </SCRIPT>
<%
End if
%>
<% = Xmlget %>
Change the username and password of Picasa in the above Code, save it as an ASP file, and put it under the server for access. Then you can see the effect.