{ "code": 200, "message": "成功!", "result": [{ "sid": "29741116", "text": "一个愿意相信,一个愿意被相信!❤️被这段滑杆表演震撼到了…", "type": "video", "thumbnail": "http://wimg.spriteapp.cn/picture/2019/0830/5d69324b77f35_wpd.jpg", "video": "http://wvideo.spriteapp.cn/video/2019/0830/5d69324b77f35_wpd.mp4", "images": null, "up": "309", "down": "8", "forward": "9", "comment": "15", "uid": "18582843", "name": "左眼看起", "header": "http://wimg.spriteapp.cn/profile/large/2016/07/31/579d3e845ec9f_mini.jpg", "top_comments_content": "其实他俩还有很多方式,只是台上不允许", "top_comments_voiceuri": "", "top_comments_uid": "19949778", "top_comments_name": "来姐夫疼祢", "top_comments_header": "http://wimg.spriteapp.cn/profile/large/2018/12/03/5c0533d1e5fac_mini.jpg", "passtime": "2001-08-31 10:29:02" }] }
import requests import json def main(): url = "https://api.apiopen.top/getJoke" r = requests.post(url,data={"type":"text"},headers= {}) joke_list = r.json().get("result") while True: i = 0; for joke_item in joke_list: print(joke_item.get("text")+"\n") i = i + 1 if input("%d/20"%(i))=="q": return if name=='main': main()