|
60鱼币
本帖最后由 昨非 于 2020-11-25 19:32 编辑
天道好轮回
终于有一天,我也会因为课内项目要用到数据处理来这里发帖求助,
之前直接跳过了爬虫那部分,这东西没用过是真搞不定
大致要求是进行舆情分析(数据来自微博)
悬赏鱼币有上限这个不好处理,不过四位数以下都好商量
了解到直接抛个项目来肯定没人看,所以只需要大家告诉我:
我需要用到哪些工具
需要学哪些东西
或者这类型的数据集一般要怎么处理?
哪些部分能用,哪些部分不能?
怎么把它转换成能看懂的格式?
就足够了
补充一点,数据集大概有1个G,所以(对我)要求可能有些苛刻,我需要更多信息指导
我尽量不亏待每一个回答的人
大致需要的位置在
整个json超过五万字符,发不上来,见谅
数据大致格式如下:
{"statuses":[{"created_at":"Mon Jul 30 23:59:28 +0800 2012","id":3473640819621095,"mid":"3473640819621095","idstr":"3473640819621095","text":"\/\/@\u7b11\u591a\u4e86\u4f1a\u53d8\u6001:\u5317\u4eac\u66b4\u96e8\u81f4\u4f7f\u6709\u4eba\u6253\u4e0d\u5f00\u8f66\u95e8\u9020\u6210\u6eba\u4ea1\uff0c\u5176\u5b9e\u88ab\u56f0\u5728\u8f66\u91cc\u9003\u751f\u65f6","source":"<a href="http:\/\/m.weibo.com\/web\/cellphone.php#iphone" rel="nofollow">iPhone\u5ba2\u6237\u7aef<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":2701566162,"idstr":"2701566162","screen_name":"\u51b0\u51b0DENG","name":"\u51b0\u51b0DENG","province":"35","city":"2","location":"\u798f\u5efa \u53a6\u95e8","description":"","url":"","profile_image_url":"http:\/\/tp3.sinaimg.cn\/2701566162\/50\/5645060822\/0","profile_url":"u\/2701566162","domain":"","weihao":"","gender":"f","followers_count":585,"friends_count":188,"statuses_count":2625,"favourites_count":299,"created_at":"Thu May 10 00:39:00 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":-1,"allow_all_comment":false,"avatar_large":"http:\/\/tp3.sinaimg.cn\/2701566162\/180\/5645060822\/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":48,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"retweeted_status":{"created_at":"","id":3472139069968229,"mid":"3472139069968229","idstr":"3472139069968229","text":"\u62b1\u6b49\uff0c\u6b64\u5fae\u535a\u5df2\u88ab\u4f5c\u8005\u5220\u9664\u3002\u67e5\u770b\u5e2e\u52a9\uff1ahttp:\/\/t.cn\/zWSudZc","state":7,"deleted":"1"},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:57:36 +0800 2012","id":3473640337422006,"mid":"3473640337422006","idstr":"3473640337422006","text":"\u5a01\u5c3c\u65af\u5f53\u5730\u65f6\u95f49\u67083\u65e5\u665a7\u70b9\uff0c\u9614\u522b\u94f6\u5e55\u591a\u65f6\u7684\u5f20\u66fc\u7389\u5e26\u7740\u4e24\u90e8\u51fa\u6f14\u7684\u77ed\u7247\u56de\u5230\u805a\u5149\u706f\u524d\uff0c\u5728\u5176\u4e2d\u4e00\u90e8\u8bb2\u8ff0\u4e2d\u56fd\u975e\u6cd5\u79fb\u6c11\u5728\u82f1\u56fd\u6d77\u6ee9\u62fe\u8d1d\u9047\u96be\u4e8b\u4ef6\u7684\u77ed\u7247\u4e2d\uff0c\u5f20\u66fc\u7389\u66f4\u662f\u4ee5\u6beb\u65e0\u53f0\u8bcd\u7684\u798f\u5efa\u4e00\u5e26\u5973\u795e\u5988\u7956\u4e00\u89d2\u51fa\u955c\u3002","source":"<a href="http:\/\/itunes.apple.com\/cn\/app\/isinaweibo\/id375364700?mt=8" rel="nofollow">iPhone\u5fae\u535a\u52a9\u624b<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","thumbnail_pic":"http:\/\/ww1.sinaimg.cn\/thumbnail\/a53b39d6jw1dvfb6z6ktpj.jpg","bmiddle_pic":"http:\/\/ww1.sinaimg.cn\/bmiddle\/a53b39d6jw1dvfb6z6ktpj.jpg","original_pic":"http:\/\/ww1.sinaimg.cn\/large\/a53b39d6jw1dvfb6z6ktpj.jpg","geo":null,"user":{"id":2772122070,"idstr":"2772122070","screen_name":"lovecamin","name":"lovecamin","province":"44","city":"1","location":"\u5e7f\u4e1c \u5e7f\u5dde","description":"","url":"","profile_image_url":"http:\/\/tp3.sinaimg.cn\/2772122070\/50\/5631795130\/1","profile_url":"u\/2772122070","domain":"","weihao":"","gender":"m","followers_count":68,"friends_count":515,"statuses_count":136,"favourites_count":0,"created_at":"Sat May 12 21:02:41 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":-1,"allow_all_comment":true,"avatar_large":"http:\/\/tp3.sinaimg.cn\/2772122070\/180\/5631795130\/1","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":9,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:57:32 +0800 2012","id":3473640320267576,"mid":"3473640320267576","idstr":"3473640320267576","text":"\u6536\u5230\u5317\u4eac\u66b4\u96e8\u63d0\u793a\u77ed\u4fe1\uff1a\u5e02\u6c14\u8c61\u53f019\u65f635\u5206\u53d1\u5e03\u66b4\u96e8\u84dd\u8272\u9884\u8b66\u4fe1\u53f7\uff1a\u672a\u67653\u5c0f\u65f6\u623f\u5c71\u4e1c\u90e8\u3001\u5927\u5174\u3001\u57ce\u516d\u533a\u3001\u901a\u5dde\u7b49\u5730\u96e8\u91cf\u5c06\u8d85\u8fc730\u6beb\u7c73\uff0c\u57ce\u533a\u9632\u79ef\u6c34\uff0c\u5c71\u533a\u707e\u533a\u9632\u5730\u8d28\u707e\u5bb3","source":"<a href="http:\/\/m.weibo.com\/web\/cellphone.php#iphone" rel="nofollow">iPhone\u5ba2\u6237\u7aef<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","thumbnail_pic":"http:\/\/ww2.sinaimg.cn\/thumbnail\/53789a0ajw1dvfb6vlhfmj.jpg","bmiddle_pic":"http:\/\/ww2.sinaimg.cn\/bmiddle\/53789a0ajw1dvfb6vlhfmj.jpg","original_pic":"http:\/\/ww2.sinaimg.cn\/large\/53789a0ajw1dvfb6vlhfmj.jpg","geo":null,"user":{"id":1400412682,"idstr":"1400412682","screen_name":"yangfan","name":"yangfan","province":"11","city":"8","location":"\u5317\u4eac \u6d77\u6dc0\u533a","description":"\u51ef\u91cc\u795e","url":"http:\/\/blog.sina.com.cn\/claudio","profile_image_url":"http:\/\/tp3.sinaimg.cn\/1400412682\/50\/1279878142\/1","profile_url":"claudio","domain":"claudio","weihao":"","gender":"m","followers_count":14502,"friends_count":1335,"statuses_count":3870,"favourites_count":21,"created_at":"Fri Aug 28 16:34:24 +0800 2009","following":false,"allow_all_act_msg":true,"geo_enabled":true,"verified":true,"verified_type":0,"allow_all_comment":true,"avatar_large":"http:\/\/tp3.sinaimg.cn\/1400412682\/180\/1279878142\/1","verified_reason":"\u65b0\u6d6a\u8fd0\u8425\u90e8\u5fae\u535a\u9891\u9053 \u6768\u5e06","follow_me":false,"online_status":0,"bi_followers_count":520,"lang":"zh-cn","star":0,"mbtype":12,"mbrank":2,"block_word":0,"ulevel":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:56:42 +0800 2012","id":3473640123459395,"mid":"3473640123459395","idstr":"3473640123459395","text":"\u5317\u4eac\u66b4\u96e8\u53d7\u707e\u4e3a\u4f55\u4e0d\u89c1\u54ed\uff1f","source":"<a href="http:\/\/weibo.com\/" rel="nofollow">\u65b0\u6d6a\u5fae\u535a<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":2430690160,"idstr":"2430690160","screen_name":"\u6211\u7cfb\u96f7\u4eba","name":"\u6211\u7cfb\u96f7\u4eba","province":"44","city":"1","location":"\u5e7f\u4e1c \u5e7f\u5dde","description":"","url":"","profile_image_url":"http:\/\/tp1.sinaimg.cn\/2430690160\/50\/5613491627\/1","profile_url":"u\/2430690160","domain":"","weihao":"","gender":"m","followers_count":58,"friends_count":185,"statuses_count":598,"favourites_count":301,"created_at":"Thu Sep 29 08:09:58 +0800 2011","following":false,"allow_all_act_msg":false,"geo_enabled":false,"verified":false,"verified_type":-1,"allow_all_comment":true,"avatar_large":"http:\/\/tp1.sinaimg.cn\/2430690160\/180\/5613491627\/1","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":25,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"retweeted_status":{"created_at":"Mon Jul 30 23:10:12 +0800 2012","id":3473628421535818,"mid":"3473628421535818","idstr":"3473628421535818","text":"\u603b\u7406\u5728\u54ea\u91cc\uff1f\u539f\u6765\u5728\u5f00\u4f1a\u3002\u6e29\u603b\uff1a\u5c3d\u5feb\u63a8\u4e00\u6279\u6c11\u95f4\u6295\u8d44\u53c2\u4e0e\u7684\u91cd\u70b9\u9879\u76ee","source":"<a href="http:\/\/weibo.com\/" rel="nofollow">\u65b0\u6d6a\u5fae\u535a<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":1680497944,"idstr":"1680497944","screen_name":"\u53e4\u6587\u667a","name":"\u53e4\u6587\u667a","province":"44","city":"1","location":"\u5e7f\u4e1c \u5e7f\u5dde","description":"\u8d22\u7ecf\u4e3b\u6301\u3001\u8bb2\u5ea7\u7b56\u5212\u3001\u5584\u89c2\u5bdf\u5e76\u601d\u8003\uff0c\u7ea6\u7a3f\u3001\u7ea6\u8bb2\u5ea7\u8bf7\u79c1\u4fe1","url":"","profile_image_url":"http:\/\/tp1.sinaimg.cn\/1680497944\/50\/1279886572\/1","profile_url":"u\/1680497944","domain":"","weihao":"","gender":"m","followers_count":9178,"friends_count":437,"statuses_count":1100,"favourites_count":170,"created_at":"Mon Jan 11 12:23:22 +0800 2010","following":false,"allow_all_act_msg":true,"geo_enabled":true,"verified":true,"verified_type":0,"allow_all_comment":true,"avatar_large":"http:\/\/tp1.sinaimg.cn\/1680497944\/180\/1279886572\/1","verified_reason":"\u5e7f\u4e1c\u7535\u53f0\u80a1\u5e02\u53f0\u77e5\u540d\u8282\u76ee\u4e3b\u6301\u4eba \u53e4\u6587\u667a","follow_me":false,"online_status":0,"bi_followers_count":218,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"reposts_count":2,"comments_count":14,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:56:27 +0800 2012","id":3473640047943266,"mid":"3473640047943266","idstr":"3473640047943266","text":"[\u881f\u71ed]\/\/@\u7075\u6027\u4e4b\u74f6: [\u8721\u70db]\/\/@\u8463\u51c0\u5fc3: [\u8721\u70db]\/\/@\u5999\u97f3\u667a\u51ef: [\u8721\u70db]\/\/@\u6210\u5c31\u6df1\u4fe1: [\u8721\u70db][\u8721\u70db][\u8721\u70db] \/\/@\u6625\u83ef\u79cb\u5be6\u5fae\u8bed\u5f55: \u963f\u5f25\u9640\u4f5b\uff01[\u881f\u71ed]\u8ba9\u6211\u4eec\u5171\u540c\u7948\u7977\u5317\u4eac\u5929\u6d25[\u5fc3]\u53ca7.21\u9047\u96be\u4ea1\u7075\u5f97\u751f\u51c0\u571f\uff1b\u7948\u613f\u53d7\u707e\u7fa4\u4f17\u65e9\u65e5\u6062\u590d\u5f80\u65e5\u7684\u5bb6\u56ed\u3002 [\u881f\u71ed][\u881f\u71ed][\u881f\u71ed]\u613f\u751f\u8005\u5409\u7965\u5b89\u4e50 \u901d\u8005\u8131\u79bb\u82e6\u96be\uff01[\u881f\u71ed]","source":"<a href="http:\/\/weibo.com\/" rel="nofollow">\u65b0\u6d6a\u5fae\u535a<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":1966481342,"idstr":"1966481342","screen_name":"\u963f\u59c6\u601d","name":"\u963f\u59c6\u601d","province":"32","city":"5","location":"\u6c5f\u82cf \u82cf\u5dde","description":"\u6709\u5922\u6700\u7f8e,\u5e0c\u671b\u76f8\u96a8!","url":"","profile_image_url":"http:\/\/tp3.sinaimg.cn\/1966481342\/50\/5636031348\/1","profile_url":"u\/1966481342","domain":"","weihao":"","gender":"m","followers_count":1105,"friends_count":727,"statuses_count":3245,"favourites_count":117,"created_at":"Tue Mar 01 00:01:33 +0800 2011","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"allow_all_comment":false,"avatar_large":"http:\/\/tp3.sinaimg.cn\/1966481342\/180\/5636031348\/1","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":716,"lang":"zh-tw","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"retweeted_status":{"created_at":"Fri Jul 27 18:50:32 +0800 2012","id":3472475897393643,"mid":"3472475897393643","idstr":"3472475897393643",
如果数据截取不全,或格式有问题,还望及时告知哈
比如这样,找出暴雨和总理两个关键词 import re
data = '''{"statuses":[{"created_at":"Mon Jul 30 23:59:28 +0800 2012","id":3473640819621095,"mid":"3473640819621095","idstr":"3473640819621095","text":"\/\/@\u7b11\u591a\u4e86\u4f1a\u53d8\u6001:\u5317\u4eac\u66b4\u96e8\u81f4\u4f7f\u6709\u4eba\u6253\u4e0d\u5f00\u8f66\u95e8\u9020\u6210\u6eba\u4ea1\uff0c\u5176\u5b9e\u88ab\u56f0\u5728\u8f66\u91cc\u9003\u751f\u65f6","source":"<a href="http:\/\/m.weibo.com\/web\/cellphone.php#iphone" rel="nofollow">iPhone\u5ba2\u6237\u7aef<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":2701566162,"idstr":"2701566162","screen_name":"\u51b0\u51b0DENG","name":"\u51b0\u51b0DENG","province":"35","city":"2","location":"\u798f\u5efa \u53a6\u95e8","description":"","url":"","profile_image_url":"http:\/\/tp3.sinaimg.cn\/2701566162\/50\/5645060822\/0","profile_url":"u\/2701566162","domain":"","weihao":"","gender":"f","followers_count":585,"friends_count":188,"statuses_count":2625,"favourites_count":299,"created_at":"Thu May 10 00:39:00 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":-1,"allow_all_comment":false,"avatar_large":"http:\/\/tp3.sinaimg.cn\/2701566162\/180\/5645060822\/0","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":48,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"retweeted_status":{"created_at":"","id":3472139069968229,"mid":"3472139069968229","idstr":"3472139069968229","text":"\u62b1\u6b49\uff0c\u6b64\u5fae\u535a\u5df2\u88ab\u4f5c\u8005\u5220\u9664\u3002\u67e5\u770b\u5e2e\u52a9\uff1ahttp:\/\/t.cn\/zWSudZc","state":7,"deleted":"1"},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:57:36 +0800 2012","id":3473640337422006,"mid":"3473640337422006","idstr":"3473640337422006","text":"\u5a01\u5c3c\u65af\u5f53\u5730\u65f6\u95f49\u67083\u65e5\u665a7\u70b9\uff0c\u9614\u522b\u94f6\u5e55\u591a\u65f6\u7684\u5f20\u66fc\u7389\u5e26\u7740\u4e24\u90e8\u51fa\u6f14\u7684\u77ed\u7247\u56de\u5230\u805a\u5149\u706f\u524d\uff0c\u5728\u5176\u4e2d\u4e00\u90e8\u8bb2\u8ff0\u4e2d\u56fd\u975e\u6cd5\u79fb\u6c11\u5728\u82f1\u56fd\u6d77\u6ee9\u62fe\u8d1d\u9047\u96be\u4e8b\u4ef6\u7684\u77ed\u7247\u4e2d\uff0c\u5f20\u66fc\u7389\u66f4\u662f\u4ee5\u6beb\u65e0\u53f0\u8bcd\u7684\u798f\u5efa\u4e00\u5e26\u5973\u795e\u5988\u7956\u4e00\u89d2\u51fa\u955c\u3002","source":"<a href="http:\/\/itunes.apple.com\/cn\/app\/isinaweibo\/id375364700?mt=8" rel="nofollow">iPhone\u5fae\u535a\u52a9\u624b<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","thumbnail_pic":"http:\/\/ww1.sinaimg.cn\/thumbnail\/a53b39d6jw1dvfb6z6ktpj.jpg","bmiddle_pic":"http:\/\/ww1.sinaimg.cn\/bmiddle\/a53b39d6jw1dvfb6z6ktpj.jpg","original_pic":"http:\/\/ww1.sinaimg.cn\/large\/a53b39d6jw1dvfb6z6ktpj.jpg","geo":null,"user":{"id":2772122070,"idstr":"2772122070","screen_name":"lovecamin","name":"lovecamin","province":"44","city":"1","location":"\u5e7f\u4e1c \u5e7f\u5dde","description":"","url":"","profile_image_url":"http:\/\/tp3.sinaimg.cn\/2772122070\/50\/5631795130\/1","profile_url":"u\/2772122070","domain":"","weihao":"","gender":"m","followers_count":68,"friends_count":515,"statuses_count":136,"favourites_count":0,"created_at":"Sat May 12 21:02:41 +0800 2012","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":-1,"allow_all_comment":true,"avatar_large":"http:\/\/tp3.sinaimg.cn\/2772122070\/180\/5631795130\/1","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":9,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:57:32 +0800 2012","id":3473640320267576,"mid":"3473640320267576","idstr":"3473640320267576","text":"\u6536\u5230\u5317\u4eac\u66b4\u96e8\u63d0\u793a\u77ed\u4fe1\uff1a\u5e02\u6c14\u8c61\u53f019\u65f635\u5206\u53d1\u5e03\u66b4\u96e8\u84dd\u8272\u9884\u8b66\u4fe1\u53f7\uff1a\u672a\u67653\u5c0f\u65f6\u623f\u5c71\u4e1c\u90e8\u3001\u5927\u5174\u3001\u57ce\u516d\u533a\u3001\u901a\u5dde\u7b49\u5730\u96e8\u91cf\u5c06\u8d85\u8fc730\u6beb\u7c73\uff0c\u57ce\u533a\u9632\u79ef\u6c34\uff0c\u5c71\u533a\u707e\u533a\u9632\u5730\u8d28\u707e\u5bb3","source":"<a href="http:\/\/m.weibo.com\/web\/cellphone.php#iphone" rel="nofollow">iPhone\u5ba2\u6237\u7aef<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","thumbnail_pic":"http:\/\/ww2.sinaimg.cn\/thumbnail\/53789a0ajw1dvfb6vlhfmj.jpg","bmiddle_pic":"http:\/\/ww2.sinaimg.cn\/bmiddle\/53789a0ajw1dvfb6vlhfmj.jpg","original_pic":"http:\/\/ww2.sinaimg.cn\/large\/53789a0ajw1dvfb6vlhfmj.jpg","geo":null,"user":{"id":1400412682,"idstr":"1400412682","screen_name":"yangfan","name":"yangfan","province":"11","city":"8","location":"\u5317\u4eac \u6d77\u6dc0\u533a","description":"\u51ef\u91cc\u795e","url":"http:\/\/blog.sina.com.cn\/claudio","profile_image_url":"http:\/\/tp3.sinaimg.cn\/1400412682\/50\/1279878142\/1","profile_url":"claudio","domain":"claudio","weihao":"","gender":"m","followers_count":14502,"friends_count":1335,"statuses_count":3870,"favourites_count":21,"created_at":"Fri Aug 28 16:34:24 +0800 2009","following":false,"allow_all_act_msg":true,"geo_enabled":true,"verified":true,"verified_type":0,"allow_all_comment":true,"avatar_large":"http:\/\/tp3.sinaimg.cn\/1400412682\/180\/1279878142\/1","verified_reason":"\u65b0\u6d6a\u8fd0\u8425\u90e8\u5fae\u535a\u9891\u9053 \u6768\u5e06","follow_me":false,"online_status":0,"bi_followers_count":520,"lang":"zh-cn","star":0,"mbtype":12,"mbrank":2,"block_word":0,"ulevel":0},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:56:42 +0800 2012","id":3473640123459395,"mid":"3473640123459395","idstr":"3473640123459395","text":"\u5317\u4eac\u66b4\u96e8\u53d7\u707e\u4e3a\u4f55\u4e0d\u89c1\u54ed\uff1f","source":"<a href="http:\/\/weibo.com\/" rel="nofollow">\u65b0\u6d6a\u5fae\u535a<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":2430690160,"idstr":"2430690160","screen_name":"\u6211\u7cfb\u96f7\u4eba","name":"\u6211\u7cfb\u96f7\u4eba","province":"44","city":"1","location":"\u5e7f\u4e1c \u5e7f\u5dde","description":"","url":"","profile_image_url":"http:\/\/tp1.sinaimg.cn\/2430690160\/50\/5613491627\/1","profile_url":"u\/2430690160","domain":"","weihao":"","gender":"m","followers_count":58,"friends_count":185,"statuses_count":598,"favourites_count":301,"created_at":"Thu Sep 29 08:09:58 +0800 2011","following":false,"allow_all_act_msg":false,"geo_enabled":false,"verified":false,"verified_type":-1,"allow_all_comment":true,"avatar_large":"http:\/\/tp1.sinaimg.cn\/2430690160\/180\/5613491627\/1","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":25,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"retweeted_status":{"created_at":"Mon Jul 30 23:10:12 +0800 2012","id":3473628421535818,"mid":"3473628421535818","idstr":"3473628421535818","text":"\u603b\u7406\u5728\u54ea\u91cc\uff1f\u539f\u6765\u5728\u5f00\u4f1a\u3002\u6e29\u603b\uff1a\u5c3d\u5feb\u63a8\u4e00\u6279\u6c11\u95f4\u6295\u8d44\u53c2\u4e0e\u7684\u91cd\u70b9\u9879\u76ee","source":"<a href="http:\/\/weibo.com\/" rel="nofollow">\u65b0\u6d6a\u5fae\u535a<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":1680497944,"idstr":"1680497944","screen_name":"\u53e4\u6587\u667a","name":"\u53e4\u6587\u667a","province":"44","city":"1","location":"\u5e7f\u4e1c \u5e7f\u5dde","description":"\u8d22\u7ecf\u4e3b\u6301\u3001\u8bb2\u5ea7\u7b56\u5212\u3001\u5584\u89c2\u5bdf\u5e76\u601d\u8003\uff0c\u7ea6\u7a3f\u3001\u7ea6\u8bb2\u5ea7\u8bf7\u79c1\u4fe1","url":"","profile_image_url":"http:\/\/tp1.sinaimg.cn\/1680497944\/50\/1279886572\/1","profile_url":"u\/1680497944","domain":"","weihao":"","gender":"m","followers_count":9178,"friends_count":437,"statuses_count":1100,"favourites_count":170,"created_at":"Mon Jan 11 12:23:22 +0800 2010","following":false,"allow_all_act_msg":true,"geo_enabled":true,"verified":true,"verified_type":0,"allow_all_comment":true,"avatar_large":"http:\/\/tp1.sinaimg.cn\/1680497944\/180\/1279886572\/1","verified_reason":"\u5e7f\u4e1c\u7535\u53f0\u80a1\u5e02\u53f0\u77e5\u540d\u8282\u76ee\u4e3b\u6301\u4eba \u53e4\u6587\u667a","follow_me":false,"online_status":0,"bi_followers_count":218,"lang":"zh-cn","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"reposts_count":2,"comments_count":14,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},"reposts_count":0,"comments_count":0,"attitudes_count":0,"mlevel":0,"visible":{"type":0,"list_id":0}},{"created_at":"Mon Jul 30 23:56:27 +0800 2012","id":3473640047943266,"mid":"3473640047943266","idstr":"3473640047943266","text":"[\u881f\u71ed]\/\/@\u7075\u6027\u4e4b\u74f6: [\u8721\u70db]\/\/@\u8463\u51c0\u5fc3: [\u8721\u70db]\/\/@\u5999\u97f3\u667a\u51ef: [\u8721\u70db]\/\/@\u6210\u5c31\u6df1\u4fe1: [\u8721\u70db][\u8721\u70db][\u8721\u70db] \/\/@\u6625\u83ef\u79cb\u5be6\u5fae\u8bed\u5f55: \u963f\u5f25\u9640\u4f5b\uff01[\u881f\u71ed]\u8ba9\u6211\u4eec\u5171\u540c\u7948\u7977\u5317\u4eac\u5929\u6d25[\u5fc3]\u53ca7.21\u9047\u96be\u4ea1\u7075\u5f97\u751f\u51c0\u571f\uff1b\u7948\u613f\u53d7\u707e\u7fa4\u4f17\u65e9\u65e5\u6062\u590d\u5f80\u65e5\u7684\u5bb6\u56ed\u3002 [\u881f\u71ed][\u881f\u71ed][\u881f\u71ed]\u613f\u751f\u8005\u5409\u7965\u5b89\u4e50 \u901d\u8005\u8131\u79bb\u82e6\u96be\uff01[\u881f\u71ed]","source":"<a href="http:\/\/weibo.com\/" rel="nofollow">\u65b0\u6d6a\u5fae\u535a<\/a>","favorited":false,"truncated":false,"in_reply_to_status_id":"","in_reply_to_user_id":"","in_reply_to_screen_name":"","geo":null,"user":{"id":1966481342,"idstr":"1966481342","screen_name":"\u963f\u59c6\u601d","name":"\u963f\u59c6\u601d","province":"32","city":"5","location":"\u6c5f\u82cf \u82cf\u5dde","description":"\u6709\u5922\u6700\u7f8e,\u5e0c\u671b\u76f8\u96a8!","url":"","profile_image_url":"http:\/\/tp3.sinaimg.cn\/1966481342\/50\/5636031348\/1","profile_url":"u\/1966481342","domain":"","weihao":"","gender":"m","followers_count":1105,"friends_count":727,"statuses_count":3245,"favourites_count":117,"created_at":"Tue Mar 01 00:01:33 +0800 2011","following":false,"allow_all_act_msg":false,"geo_enabled":true,"verified":false,"verified_type":220,"allow_all_comment":false,"avatar_large":"http:\/\/tp3.sinaimg.cn\/1966481342\/180\/5636031348\/1","verified_reason":"","follow_me":false,"online_status":0,"bi_followers_count":716,"lang":"zh-tw","star":0,"mbtype":0,"mbrank":0,"block_word":0,"ulevel":0},"retweeted_status":{"created_at":"Fri Jul 27 18:50:32 +0800 2012","id":3472475897393643,"mid":"3472475897393643","idstr":"3472475897393643",'''
result=re.findall('"text":(.*?),', data)
print(result)
print()
for a in result:
t=re.search(r'暴雨|总理', a)
if t !=None:
print(a)
"\/\/@笑多了会变态:北京暴雨致使有人打不开车门造成溺亡,其实被困在车里逃生时"
"收到北京暴雨提示短信:市气象台19时35分发布暴雨蓝色预警信号:未来3小时房山东部、大兴、城六区、通州等地雨量将超过30毫米,城区防积水,山区灾区防地质灾害"
"北京暴雨受灾为何不见哭?"
"总理在哪里?原来在开会。温总:尽快推一批民间投资参与的重点项目"
|
最佳答案
查看完整内容
比如这样,找出暴雨和总理两个关键词
"\/\/@笑多了会变态:北京暴雨致使有人打不开车门造成溺亡,其实被困在车里逃生时"
"收到北京暴雨提示短信:市气象台19时35分发布暴雨蓝色预警信号:未来3小时房山东部、大兴、城六区、通州等地雨量将超过30毫米,城区防积水,山区灾区防地质灾害"
"北京暴雨受灾为何不见哭?"
"总理在哪里?原来在开会。温总:尽快推一批民间投资参与的重点项目"
|