<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>

  

ASP HUOSHAN VIDEO的更多相关文章

  1. Asp.net FileUpload+Image制作头像效果

    在Web开发中会经常使用到个人信息注册,而个人信息中通常需要自己的头像或者照片.今天主要介绍一下使用FileUpload+img控件上传照片. FileUpLoad控件使用介绍 FileUpLoad控 ...

  2. ASP.NET Web Pages (Razor) API Quick Reference

    ASP.NET Web Pages (Razor) API Quick Reference By Tom FitzMacken|February 10, 2014 Print This page co ...

  3. ASP.NET—016:ASP.NET中保存文件对话框

    本想在asp.net中使用savediallog保存文件,结果提示:当应用程序不是以 UserInteractive 模式执行时显示模式对话框或窗口是无效操作. 在ASP.NET中使用例如以下方式.保 ...

  4. PHP中的header()函数作用

    PHP 中 header()函数的作用是给客户端发送头信息. 什么是头信息?这里只作简单解释,详细的自己看http协议.在 HTTP协议中,服务器端的回答(response)内容包括两部分:头信息(h ...

  5. Ajax ContentType 列表大全

    ".*"="application/octet-stream" ".001"="application/x-001" & ...

  6. MIME(多用途互联网邮件扩展类型)

    MIME对照表 百度百科 MIME(Multipurpose Internet Mail Extensions)多用途互联网邮件扩展类型.(百度百科).是设定某种扩展名的文件用一种应用程序来打开的方式 ...

  7. 服务器响应HTTP的类型ContentType大全

    ".*"="application/octet-stream" ".001"="application/x-001" & ...

  8. 写一个 nodejs npm应用 - webhere

    前言.没图不说话,先上图. What's webhere? 有没有遇到这样的场景:写程序的时候,需要访问一个文件,这个文件 需要是放到一台web服务器上,但是你不是开发的web应用. 所以呢,你不得不 ...

  9. HTTP Content-type

    文件扩展名 Content-Type 文件扩展名      Content-Type .* application/octet-stream .tif image/tiff .001 applicat ...

随机推荐

  1. TensorFlow数据读取方式:Dataset API

    英文详细版参考:https://www.cnblogs.com/jins-note/p/10243716.html Dataset API是TensorFlow 1.3版本中引入的一个新的模块,主要服 ...

  2. Android解析WindowManager(一)WindowManager体系

    前言 WindowManagerService(WMS)和AMS一样,都是Android开发需要掌握的知识点,同样的,WMS也很复杂,需要多篇文章来进行讲解,为何更好的理解WMS,首先要了解Windo ...

  3. idea常规设置

    java开发目前很多都是使用IntelliJ IDEA这款神器.废话不多说,官网地址:https://www.jetbrains.com/idea/ 我一直都是保持最新版本,安装之后注册. 首先需要安 ...

  4. http请求工具-OkHttp用法

    OKHttp介绍 okhttp是一个第三方类库,用于android中请求网络.这是一个开源项目,是安卓端最火热的轻量级框架,由移动支付Square公司贡献(该公司还贡献了Picasso和LeakCan ...

  5. 从专用磁盘创建 Windows VM

    通过使用 Powershell 将专用托管磁盘附加为 OS 磁盘来创建新 VM. 专用磁盘是保留原始 VM 中的用户帐户.应用程序和其他状态数据的现有 VM 中虚拟硬盘 (VHD) 的副本. 使用专用 ...

  6. python基础学习21----进程

    python中的多线程其实并不是真正的多线程,如果想要充分地使用多核CPU的资源,在python中大部分情况需要使用多进程. 进程与线程的使用有很多相似之处,有关线程方面的知识请参考https://w ...

  7. Hadoop 本地模式安装

    0. 说明 本地模式:使用的存储系统,是Linux系统 提前安装好 JDK 参考 CentOS7 安装 JDK 1. 将 Hadoop 的安装包通过 Xftp 发送到centos 用户的 home 目 ...

  8. 【转】Redis学习---NoSQL和SQL的区别及使用场景

    什么是NoSQL NoSQL,指的是非关系型的数据库.NoSQL有时也称作Not Only SQL的缩写,是对不同于传统的关系型数据库的数据库管理系统的统称,它具有非关系型.分布式.不提供ACID的数 ...

  9. 联想笔记本BIOS设置中文详解

    对于很多新装系统的小伙伴们 可能很多都不是太懂BIOS中都是干什么用的,小编这里给大家详细介绍一下 联想笔记本的主板BIOS设置跟别的笔记本或许有些不同但大体相差不多,和大家分享一下. BIOS介绍 ...

  10. Django基础与组件

    第一章:Django系列之web应用与http协议 第二章:基于wsgiref模块DIY一个web框架 第三章:Django下载与简介 第四章:url控制系统 第五章:视图 第六章:Django模板语 ...