新浪微博返回JSON的解析

左小皓 2013-06-24 10:43:20
{"statuses":[{"created_at":"Mon Jun 24 08:16:26 +0800 2013","id":3592629092421807,"mid":"3592629092421807","idstr":"3592629092421807","text":"【不老仙妻的美肤秘密】布朗兄弟打造Q弹果冻紧实皮肤的秘密武器——多肽胶原蛋白保湿精华液!100%纯度,不添加防腐剂,一次相当于3个月精华效果哦!针对皮肤黯沉、过敏、粗毛孔的女生,效果非常明显哦!分享给姐妹们啦: http://t.cn/zHdkOoN","source":"<a href=\"http://app.weibo.com/t/feed/OChwC\" rel=\"nofollow\">云中小鸟</a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","pic_urls":[{"thumbnail_pic":"http://ww4.sinaimg.cn/thumbnail/9b8ea11djw1e5ywv2xgt4j207x081jri.jpg"}],"thumbnail_pic":"http://ww4.sinaimg.cn/thumbnail/9b8ea11djw1e5ywv2xgt4j207x081jri.jpg","bmiddle_pic":"http://ww4.sinaimg.cn/bmiddle/9b8ea11djw1e5ywv2xgt4j207x081jri.jpg","original_pic":"http://ww4.sinaimg.cn/large/9b8ea11djw1e5ywv2xgt4j207x081jri.jpg","geo":null,"user":{"id":2609815837,"idstr":"2609815837","screen_name":"摄氏0度2012","name":"摄氏0度2012","province":"12","city":"13","location":"天津 北辰区","description":"","url":"","profile_image_url":"http://tp2.sinaimg.cn/2609815837/50/5623316335/0","profile_url":"u/2609815837","domain":"","weihao":"","gender":"f","followers_count":3772,"friends_count":1956,"statuses_count":2367,"favourites_count":1,"created_at":"Sat Feb 04 17:48:25 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"remark":"","allow_all_comment":true,"avatar_large":"http://tp2.sinaimg.cn/2609815837/180/5623316335/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":1287,"lang":"zh-cn","star":0,"mbtype":2,"mbrank":1,"block_word":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},


{"created_at":"Mon Jun 24 06:16:20 +0800 2013","id":3592598872196982,"mid":"3592598872196982","idstr":"3592598872196982","text":"完美芦荟胶才25元!一支就包邮,买2支还送一支,好便宜啊~~夏天到了,家里一定要多备些,对蚊虫叮咬、擦伤烫伤、晒后皮肤修复。。。都很有帮助~~趁着便宜,赶紧囤货吧>>>http://vuj.tv/MeE3rMIR","source":"<a href=\"http://app.weibo.com/t/feed/OChwC\" rel=\"nofollow\">云中小鸟</a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","pic_urls":[{"thumbnail_pic":"http://ww2.sinaimg.cn/thumbnail/9b8ea11djw1e5yte491wrj20c80azmy9.jpg"}],"thumbnail_pic":"http://ww2.sinaimg.cn/thumbnail/9b8ea11djw1e5yte491wrj20c80azmy9.jpg","bmiddle_pic":"http://ww2.sinaimg.cn/bmiddle/9b8ea11djw1e5yte491wrj20c80azmy9.jpg","original_pic":"http://ww2.sinaimg.cn/large/9b8ea11djw1e5yte491wrj20c80azmy9.jpg","geo":null,"user":{"id":2609815837,"idstr":"2609815837","screen_name":"摄氏0度2012","name":"摄氏0度2012","province":"12","city":"13","location":"天津 北辰区","description":"","url":"","profile_image_url":"http://tp2.sinaimg.cn/2609815837/50/5623316335/0","profile_url":"u/2609815837","domain":"","weihao":"","gender":"f","followers_count":3772,"friends_count":1956,"statuses_count":2367,"favourites_count":1,"created_at":"Sat Feb 04 17:48:25 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"remark":"","allow_all_comment":true,"avatar_large":"http://tp2.sinaimg.cn/2609815837/180/5623316335/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":1287,"lang":"zh-cn","star":0,"mbtype":2,"mbrank":1,"block_word":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},


{"created_at":"Mon Jun 24 04:16:19 +0800 2013","id":3592568664962659,"mid":"3592568664962659","idstr":"3592568664962659","text":"见效啦!终于见效啦!!看见我粉红的小脸蛋了么?以前得了湿疹的时候一直不知道怎么办?在使用过舒蔓达的一款药妆去湿疹以后,皮肤见效好快,几天就恢复了水嫩粉红。推荐给大家哦!听说最近还搞活动,《68元包邮特价》,快去抢购吧~:http://t.cn/zHdrSuJ","source":"<a href=\"http://app.weibo.com/t/feed/OChwC\" rel=\"nofollow\">云中小鸟</a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","pic_urls":[{"thumbnail_pic":"http://ww3.sinaimg.cn/thumbnail/9b8ea11djw1e5ypx8r4c8j20cp0gg76d.jpg"}],"thumbnail_pic":"http://ww3.sinaimg.cn/thumbnail/9b8ea11djw1e5ypx8r4c8j20cp0gg76d.jpg","bmiddle_pic":"http://ww3.sinaimg.cn/bmiddle/9b8ea11djw1e5ypx8r4c8j20cp0gg76d.jpg","original_pic":"http://ww3.sinaimg.cn/large/9b8ea11djw1e5ypx8r4c8j20cp0gg76d.jpg","geo":null,"user":{"id":2609815837,"idstr":"2609815837","screen_name":"摄氏0度2012","name":"摄氏0度2012","province":"12","city":"13","location":"天津 北辰区","description":"","url":"","profile_image_url":"http://tp2.sinaimg.cn/2609815837/50/5623316335/0","profile_url":"u/2609815837","domain":"","weihao":"","gender":"f","followers_count":3772,"friends_count":1956,"statuses_count":2367,"favourites_count":1,"created_at":"Sat Feb 04 17:48:25 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"remark":"","allow_all_comment":true,"avatar_large":"http://tp2.sinaimg.cn/2609815837/180/5623316335/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":1287,"lang":"zh-cn","star":0,"mbtype":2,"mbrank":1,"block_word":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},


{"created_at":"Mon Jun 24 02:16:18 +0800 2013","id":3592538461748325,"mid":"3592538461748325","idstr":"3592538461748325","text":"春暖花开,拉上男朋友逛街是这个季节最幸福的事啦~!可是姐却悲催了一次,男朋友陪我去买衣服,总觉得他心不在焉,原来是在偷瞄胸大的MM,把姐气的肝儿颤!后来试了下这个,一个月就从75A升级到75C!必须分享给同样痛苦的姐妹:http://t.cn/zHd1qmE","source":"<a href=\"http://app.weibo.com/t/feed/OChwC\" rel=\"nofollow\">云中小鸟</a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","pic_urls":[{"thumbnail_pic":"http://ww4.sinaimg.cn/thumbnail/9b8ea11djw1e5ymgcpgc7j20au0g0q3a.jpg"}],"thumbnail_pic":"http://ww4.sinaimg.cn/thumbnail/9b8ea11djw1e5ymgcpgc7j20au0g0q3a.jpg","bmiddle_pic":"http://ww4.sinaimg.cn/bmiddle/9b8ea11djw1e5ymgcpgc7j20au0g0q3a.jpg","original_pic":"http://ww4.sinaimg.cn/large/9b8ea11djw1e5ymgcpgc7j20au0g0q3a.jpg","geo":null,"user":{"id":2609815837,"idstr":"2609815837","screen_name":"摄氏0度2012","name":"摄氏0度2012","province":"12","city":"13","location":"天津 北辰区","description":"","url":"","profile_image_url":"http://tp2.sinaimg.cn/2609815837/50/5623316335/0","profile_url":"u/2609815837","domain":"","weihao":"","gender":"f","followers_count":3772,"friends_count":1956,"statuses_count":2367,"favourites_count":1,"created_at":"Sat Feb 04 17:48:25 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"remark":"","allow_all_comment":true,"avatar_large":"http://tp2.sinaimg.cn/2609815837/180/5623316335/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":1287,"lang":"zh-cn","star":0,"mbtype":2,"mbrank":1,"block_word":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},

{"created_at":"Sun Jun 23 22:16:26 +0800 2013","id":3592478105940094,"mid":"3592478105940094","idstr":"3592478105940094","text":"今天给大叫讲的是芦荟胶的作用,它有激活细胞活力,延续皮肤衰老,收敛,调和皮肤,滋养皮肤,和保护皮肤的功效,关键是它还能防晒祛斑,爱美之心人皆有之,我今天把我的变美秘决给你们说,一定要来看看哦 .>>>>>>http://t.cn/zHdHfjR","source":"<a href=\"http://app.weibo.com/t/feed/OChwC\" rel=\"nofollow\">云中小鸟</a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","pic_urls":[{"thumbnail_pic":"http://ww4.sinaimg.cn/thumbnail/9b8ea11djw1e5yfit4trgj20kr09bjsj.jpg"}],"thumbnail_pic":"http://ww4.sinaimg.cn/thumbnail/9b8ea11djw1e5yfit4trgj20kr09bjsj.jpg","bmiddle_pic":"http://ww4.sinaimg.cn/bmiddle/9b8ea11djw1e5yfit4trgj20kr09bjsj.jpg","original_pic":"http://ww4.sinaimg.cn/large/9b8ea11djw1e5yfit4trgj20kr09bjsj.jpg","geo":null,"user":{"id":2609815837,"idstr":"2609815837","screen_name":"摄氏0度2012","name":"摄氏0度2012","province":"12","city":"13","location":"天津 北辰区","description":"","url":"","profile_image_url":"http://tp2.sinaimg.cn/2609815837/50/5623316335/0","profile_url":"u/2609815837","domain":"","weihao":"","gender":"f","followers_count":3772,"friends_count":1956,"statuses_count":2367,"favourites_count":1,"created_at":"Sat Feb 04 17:48:25 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"remark":"","allow_all_comment":true,"avatar_large":"http://tp2.sinaimg.cn/2609815837/180/5623316335/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":1287,"lang":"zh-cn","star":0,"mbtype":2,"mbrank":1,"block_word":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},

{"created_at":"Sun Jun 23 02:16:20 +0800 2013","id":3592176082465320,"mid":"3592176082465320","idstr":"3592176082465320","text":"夏天到了,淘了个丰胸贴来用用,店家说我用1个月就可以从A到C的,我都用2个月了,才到B杯呢,问店家,店家说个人吸收不同,让我继续使用,我到底要不要继续呢?http://t.cn/zHrey8j","source":"<a href=\"http://app.weibo.com/t/feed/OChwC\" rel=\"nofollow\">云中小鸟</a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","pic_urls":[{"thumbnail_pic":"http://ww3.sinaimg.cn/thumbnail/9b8ea11djw1e5xgu2t3n6j20en0jy75n.jpg"}],"thumbnail_pic":"http://ww3.sinaimg.cn/thumbnail/9b8ea11djw1e5xgu2t3n6j20en0jy75n.jpg","bmiddle_pic":"http://ww3.sinaimg.cn/bmiddle/9b8ea11djw1e5xgu2t3n6j20en0jy75n.jpg","original_pic":"http://ww3.sinaimg.cn/large/9b8ea11djw1e5xgu2t3n6j20en0jy75n.jpg","geo":null,"user":{"id":2609815837,"idstr":"2609815837","screen_name":"摄氏0度2012","name":"摄氏0度2012","province":"12","city":"13","location":"天津 北辰区","description":"","url":"","profile_image_url":"http://tp2.sinaimg.cn/2609815837/50/5623316335/0","profile_url":"u/2609815837","domain":"","weihao":"","gender":"f","followers_count":3772,"friends_count":1956,"statuses_count":2367,"favourites_count":1,"created_at":"Sat Feb 04 17:48:25 +0800 2012","followin

新浪微博statuses_user_timeline命令,获取用户的微博,默认返回20条,我不知道怎么一条条的分出来。我想做的是:比如返回数据中的第一条是什么内容,微博ID是什么,等等,第二条的内容,ID,来自什么应用,等等。大家告诉我一下,帮个忙。json格式,返回的数据是没有换行的,我是为了大家看着方便 前面加了几个换行
我用的是易语言。有没有这方面的模块。具体怎么用。最好来个例子或代码。
有不明白我表达的请跟贴。
...全文
252 点赞 收藏 3
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
秦宇升 2013-09-25
c#的有没有?
回复
秦宇升 2013-09-25
C#的有么有?
回复
蓝天630902 2013-06-25
用Excel吧:

Sub Json解析()
    Set ms = CreateObject("MSScriptControl.ScriptControl")
    Set mx = CreateObject("Microsoft.XMLHTTP")
    Cells.NumberFormatLocal = "@"
    td1 = Split("created_at,id,mid,idstr,text,source,favorited,truncated,in_reply_to_status_id,in_reply_to_user_id,in_reply_to_screen_name,pic_urls[0].thumbnail_pic,thumbnail_pic,bmiddle_pic,original_pic", ",")
    td2 = Split("id,screen_name,name,province,city,location,description,url,profile_image_url,profile_url,domain,weihao,gender,followers_count,friends_count,statuses_count,favourites_count,created_at,following,allow_all_act_msg,geo_enabled,verified,verified_type,remark,allow_all_comment,avatar_large,verified_reason,follow_me,online_status,bi_followers_count,lang,star,mbtype,mbrank,block_word", ",")

    mx.Open "GET", "http://bbs.csdn.net/topics/390498319", False
    mx.send
    ss = Split(Split(Split(mx.responsetext, "brush: text"">")(1), "</pre>")(0), "<br />")
    tt = ""
    For j = 0 To UBound(ss) - 2
        tt = tt & ss(j)
    Next j
    tt = "a=" & tt & "};"
    tt = Replace(Replace(Replace(tt, ",};", "]};"), vbLf, ""), " ", " ")
    With CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
        .SetText tt
        .PutInClipboard
    End With

    ms.Language = "JScript"
    ms.AddCode tt
    For i = 0 To 4
        For j = 0 To UBound(td1) - 1
            Cells(i + 1, j + 1) = ms.eval("a.statuses[" & i & "]." & td1(j))
        Next j
        For j = 0 To UBound(td2) - 1
            Cells(i + 1, j + 15) = ms.eval("a.statuses[" & i & "].user." & td2(j))
        Next j
    Next i
End Sub

回复
相关推荐
发帖
其他开发语言
创建于2007-08-27

3381

社区成员

其他开发语言 其他开发语言
申请成为版主
帖子事件
创建了帖子
2013-06-24 10:43
社区公告
暂无公告