弹来弹去跑马灯!

ASP HUOSHAN VIDEO

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test json parse huoshan video </title>
<style>
a.aaa{
display:block;
display:inline;
 
 
}
a.aaa img{
width:49%;
}
</style>
</head>
<body>
<script type="text/javascript">
function test(str){
}
 
</script>
<form method="get">
<p>user_id: <input type="text" name="user_id" valu="62463130220"/></p>
<input type="submit" value="Submit" />
</form>
 
<script language="jscript" runat="server"> 
    Array.prototype.get = function(x) { return this[x]; }; 
    function parseJSON(strJSON) { return eval("(" + strJSON + ")"); } 
</script
<% 
'"https://reflow.huoshan.com/share/load_videos/?offset=0&count=21&user_id=62463130220"
dim user_id
Dim xmlServerHttp
user_id=""& request("user_id")
if trim(user_id)="" then
response.end
end if
 
 
set xmlserverhttp = server.createobject("MSXML2.ServerXMLHTTP")
 
 
xmlServerHttp.open "GET", "https://reflow.huoshan.com/share/load_videos/?offset=0&count=21&user_id=" & user_id,false 'true'发起异步请求
xmlServerHttp.send
'response.write "Receiver Page: " & xmlServerHttp.responseText & "<br/>"
parsHTML(xmlServerHttp.responseText)
 
function  parsHTML(json)
    Dim  obj 
    Set obj = parseJSON(json)  
    for i=0 to obj.data.items.length-1
    Response.Write "<a class='aaa' href='" &  obj.data.items.get(i).video.url_list.get(0)  & "'><img src='" & obj.data.items.get(i).video.cover.url_list.get(0) & "'/></a>" 
    next
     
    '{"status_code": 0, "data": {"items": [{"video": {"width": 720, "ratio": 1.78, "duration": 14.835, "url_list": ["http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0200cfe0000bd89k15ds135d7v58jeg&line=0&app_id=1112", "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0200cfe0000bd89k15ds135d7v58jeg&line=1&app_id=1112"], "cover": {"url_list": ["http://p3.pstatp.com/large/9afd0003d4cdfb41ffb8.jpg", "http://pb9.pstatp.com/large/9afd0003d4cdfb41ffb8.jpg", "http://pb3.pstatp.com/large/9afd0003d4cdfb41ffb8.jpg"], "uri": "large/9afd0003d4cdfb41ffb8"}, "uri": "v0200cfe0000bd89k15ds135d7v58jeg", "height": 1280}, "id": "6579928818356587784"}, {"video": {"width": 720, "ratio": 1.78, "duration": 14.835, "url_list": ["http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0300c1a0000bd890g4hpahlrakkheh0&line=0&app_id=1112", "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0300c1a0000bd890g4hpahlrakkheh0&line=1&app_id=1112"], "cover": {"url_list": ["http://p3.pstatp.com/large/9af600084bbc9b85f61a.jpg", "http://pb9.pstatp.com/large/9af600084bbc9b85f61a.jpg", "http://pb3.pstatp.com/large/9af600084bbc9b85f61a.jpg"], "uri": "large/9af600084bbc9b85f61a"}, "uri": "v0300c1a0000bd890g4hpahlrakkheh0", "height": 1280}, "id": "6579917988248423683"}, {"video": {"width": 720, "ratio": 1.78, "duration": 11.234, "url_list": ["http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0300c1f0000bd7am24hpahqkhi5tufg&line=0&app_id=1112", "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0300c1f0000bd7am24hpahqkhi5tufg&line=1&app_id=1112"], "cover": {"url_list": ["http://p3.pstatp.com/large/9a8900026f71942557dd.jpg", "http://pb9.pstatp.com/large/9a8900026f71942557dd.jpg", "http://pb3.pstatp.com/large/9a8900026f71942557dd.jpg"], "uri": "large/9a8900026f71942557dd"}, "uri": "v0300c1f0000bd7am24hpahqkhi5tufg", "height": 1280}, "id": "6579385610274868494"}, {"video": {"width": 720, "ratio": 1.78, "duration": 14.703, "url_list": ["http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0200c1f0000bd7887tqg5b9ehd4bas0&line=0&app_id=1112", "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0200c1f0000bd7887tqg5b9ehd4bas0&line=1&app_id=1112"], "cover": {"url_list": ["http://p3.pstatp.com/large/9a7f0011a3b63b5b4ba9.jpg", "http://pb9.pstatp.com/large/9a7f0011a3b63b5b4ba9.jpg", "http://pb3.pstatp.com/large/9a7f0011a3b63b5b4ba9.jpg"], "uri": "large/9a7f0011a3b63b5b4ba9"}, "uri": "v0200c1f0000bd7887tqg5b9ehd4bas0", "height": 1280}, "id": "6579344756453674247"}, {"video": {"width": 720, "ratio": 1.78, "duration": 14.702, "url_list": ["http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0200c840000bd786tu4tqbi12hodsfg&line=0&app_id=1112", "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=v0200c840000bd786tu4tqbi12hods
     
    Set obj = Nothing 
     
end function
 
 
function  parsHTML22222()
    Dim json, obj 
    json = "{a:""aaa"", b:{ name:""bb"", value:""text"" }, c:[""item0"", ""item1"", ""item2""]}" 
    Set obj = parseJSON(json) 
  
    Response.Write "JSON原文为:<br>" 
    Response.Write json
    Response.Write "<hr>"
  
    Response.Write "a=" & obj.a & "<br />" 
    Response.Write "b=" & obj.b.name & "<br />" 
    Response.Write "c.length=" & obj.c.length & "<br />" 
    Response.Write "c.get(0)=" & obj.c.get(0) & "<br />" 
    Set obj = Nothing 
     
end function
     
     
%> 
 
 
</body>
</html>

  

posted @   wgscd  阅读(1018)  评论(15编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
点击右上角即可分享
微信分享提示