韓劇TV UWP開發---抓包分析
一,使用工具
①Fiddler
摘自百度百科Fiddler簡介:
Fiddler是一個http協議調試代理工具,它能夠記錄並檢查所有你的電腦和互聯網之間的http通訊,設置斷點,查看所有的“進出”Fiddler的數據(指cookie,html,js,css等文件,這些都可以讓你胡亂修改的意思)。 Fiddler 要比其他的網絡調試器要更加簡單,因為它不僅僅暴露http通訊還提供了一個用戶友好的格式。
下載地址:
http://rj.baidu.com/soft/detail/10963.html
(需.Net Framework環境)
軟件截圖:
設置過程:
工具--選項--
②安卓手機/模擬器
設置過程:
2-1獲取到電腦本地在局域網的IP
點擊fiddler右上角的=》鼠標放在“聯網”=》下側會彈出本機網卡的所有IP地址(根據自己電腦的網卡選擇)
如我的現在是連接著無線路由器,路由器分配的內網IP是192.168.128.1
2-2在手機端設置=》WLAN=》選擇連接著的SSID=》修改=》高級選項
二,開始抓包
清空無效的會話-刪除所有
打開App,Fiddler會話窗口開始接收到包信息
已經看到了抓到的HTTP請求包
主要是api.hanju.koudaibao.com
下面的含有qq.com的是韓劇TV使用QQ開放平臺登陸的請求
三,請求分析
3-1明星API
http://api.hanju.koudaibaobao.com/api/star/hotVideos?offset=0&count=30
從API鏈接名來分析,這個API是在star/下的熱門視頻
從API的參數來分析,offset是起始,count是請求條數
json字符串結果如下(有省略):
{ "rescode": 0, "ts": 1519907687399, "videos": [ { "vid": 10694864, "gvid": "1_SCvjZXyzKu", "title": "《微微一笑很傾城2》男主還是楊洋,機場一行為很暖心", "sources": [ { "page": "http://www.bilibili.com/video/av20126202", "offset": 0, "skip": 0, "prior": 0 } ], "thumb": "http://i0.hdslb.com/bfs/archive/b81c184ea7fdd1ef2663aba4d1f807af5011c1a8.jpg", "intro": "《微微一笑很傾城2》男主還是楊洋,機場一行為很暖心", "length": 107, "publishTime": 1519786862000, "playCount": 0, "danmuCount": 0, "likeCount": 0, "postCount": 0, "videoType": 1 }, { "vid": 10694406, "gvid": "1_BNg8gZiByA", "title": "宋智孝:李光洙你不要和我打招呼!", "sources": [ { "page": "http://www.bilibili.com/video/av20148692", "offset": 0, "skip": 0, "prior": 0 } ], "thumb": "http://i2.hdslb.com/bfs/archive/fe32f3fcda1db802997a4bcf1913605ade6a3536.jpg", "intro": "沒別的想法,就只是幾個光洙被“欺負”的小片段", "length": 181, "publishTime": 1519768876000, "playCount": 0, "danmuCount": 0, "likeCount": 0, "postCount": 0, "videoType": 1 }, { "vid": 10695447, "gvid": "1_4YDaEQtBdb", "title": "【樸敘俊吻戲混剪】教科書級別吮(啃)吻(法)", "sources": [ { "page": "http://www.bilibili.com/video/av20159925", "offset": 0, "skip": 0, "prior": 0 } ], "thumb": "http://i1.hdslb.com/bfs/archive/a9cce595ee64fa3ab6b9fc42cf5a7ee22748d36e.jpg", "intro": "踩點技能尚待開發", "length": 246, "publishTime": 1519805035000, "playCount": 0, "danmuCount": 0, "likeCount": 0, "postCount": 0, "videoType": 1 }, { "vid": 10694020, "gvid": "1_xDVk9mkr0p", "title": "【金所炫Cherish中站】中字-尹鬥俊&金所炫 韓劇《Radio Romance》第十集結尾吻戲CUT", "sources": [ { "page": "http://www.bilibili.com/video/av20157610", "offset": 0, "skip": 0, "prior": 0 } ], "thumb": "http://i0.hdslb.com/bfs/archive/487618ac5e4fbab6295b9644492772e3b5bdae8d.jpg", "intro": "http://tv.naver.com/kbs.radioromance\n180227《Radio Romance》第十集結尾吻戲CUT,等了半天終於在本集結尾發了糖~", "length": 236, "publishTime": 1519754404000, "playCount": 0, "danmuCount": 0, "likeCount": 0, "postCount": 0, "videoType": 1 }, { "vid": 10695391, "gvid": "1_UEoK9B22sT", "title": "【李鐘碩】【沈迷抖音的韓國歐巴】二碩跳舞超級可愛", "sources": [ { "page": "http://www.bilibili.com/video/av20172199", "offset": 0, "skip": 0, "prior": 0 } ], "thumb": "http://i0.hdslb.com/bfs/archive/4f2465908806f3d994a3a95a651c740a4199f35f.jpg", "intro": "李鐘碩tiktok\n李鐘碩跳舞太可愛了,簡直要了我的命,情敵拔刀吧,他是我的。\n九秒鐘根本不夠看啊!!up主弄得循環版本", "length": 67, "publishTime": 1519804703000, "playCount": 0, "danmuCount": 0, "likeCount": 0, "postCount": 0, "videoType": 1 }, { "vid": 10694044, "gvid": "1_VN83mni4vZ", "title": "【韓劇剪輯 | 我的秘密飯店 】男女主角之間很長很長...的愛情故事",}]}
3-2熱門視頻API
http://api.hanju.koudaibaobao.com/api/star/index
{ "rescode": 0,//請求結果 "ts": 1519905830032, "hotStars": [//明星數組 { "sid": 3,//明星id "name": "李鐘碩",//明星名字 "thumb": "http://pic8.qiyipic.com/image/20160307/b3/5f/p_1037671_m_601_m3.jpg",//封面圖片 "baikeUrl": "http://baike.baidu.com/link?url=_0M2NG17DFDCqsvF_Hw9Ljb_kRSWgF_1PHz76quSjtKoztOlwE7CxwgfeojYWxVV6SCIeORJ4KvF6ZfKI1qUta",//百度百科URL "fansCount": 1210950,//粉絲數量 "rank": 1//排名 }, { "sid": 153, "name": "南柱赫", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FvIXN0oZZrTrcxFVPP8AzhZKhWSy.jpg", "baikeUrl": "http://baike.baidu.com/item/%E5%8D%97%E6%9F%B1%E8%B5%AB", "fansCount": 909146, "rank": 2 }, { "sid": 24, "name": "李敏鎬", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FpDdqMGE-rRDjOQQ-f310ZmcwnUR.png", "baikeUrl": "http://baike.baidu.com/view/2156717.htm", "fansCount": 682869, "rank": 3 }, { "sid": 9, "name": "宋仲基", "thumb": "http://pic2.qiyipic.com/image/20160307/c2/7e/p_2012860_m_601_m3.jpg", "baikeUrl": "http://baike.baidu.com/link?url=Ca51yMEttr59VbkZKEhg832tiDqI2wcesikmm1aCyljZzzp2QQPS0i_vJhir4ox0_eaYEcDsbN5VJ-pz9bftf_", "fansCount": 581588, "rank": 4 }, { "sid": 7, "name": "樸燦烈", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FjXgY0MAisl9kUIG7Ha_igvW43o_.png", "baikeUrl": "http://baike.baidu.com/view/4277180.htm", "fansCount": 569223, "rank": 5 }, { "sid": 26, "name": "池昌旭", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/Fj5kEbF-11GSoEH2y3yTiaTOFRhZ.png", "baikeUrl": "http://baike.baidu.com/view/2448556.htm", "fansCount": 529745, "rank": 6 }, { "sid": 2, "name": "EXO", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/Fpj1jJey7j6MhzzYBfXLzbtbExp5.jpg", "baikeUrl": "http://baike.baidu.com/link?url=emvZ2u9hbG6sC3cqUUUbo90PXxe1NGuVKnIyDV42k8SGdy5vmVICilx3yPblIwktYLHJETZDiVr1KCB17rDqDI6DADA6gPbLSpnfDNVAjtW", "fansCount": 468617, "rank": 7 } ] }
安卓UI截圖
3-2韓劇API
http://api.hanju.koudaibaobao.com/api/series/indexV2?offset=0&count=48
{ "rescode": 0,//請求結果 "ts": 1519906095985, "seriesList": [ { "sid": "diLIx4HEsJx4bDYf4aEE",//韓劇id "name": "花遊記",//韓劇名字 "rank": 77,//排名 "isFinished": false,//是否更新完畢 "publishTime": 1512748800000,//發布時間 "updateTime": 1519598669000,//更新時間 "intro": "",//描述 "thumb": "http://res.hanju.koudaibaobao.com/hj_res/Fk2BP5EGzFDswZ0KbCLrFV2zvoY4.jpg?imageView2/2/w/200/interlace/1",//封面圖片 "count": 18,//集數 "source": "tvn",//來源 "category": 1//種類 }, { "sid": "c8E5fUoiGXziVIBbzsOW", "name": "機智的監獄生活", "rank": 94, "isFinished": true, "publishTime": 1511280000000, "updateTime": 1516327442000, "intro": "", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FopRlrRSpJS2pyhq6R5rq_Mju_u0.jpg?imageView2/2/w/200/interlace/1", "count": 16, "source": "樂視", "category": 1 }, { "sid": "i4BMjH9kkyY5yKNqen6q", "name": "廣播羅曼史/Radio Romance", "rank": 75, "isFinished": false, "publishTime": 1517155200000, "updateTime": 1519756380000, "intro": "", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FnZwRQvARrOg0jBds-uTggNWjpdK.jpg?imageView2/2/w/200/interlace/1", "count": 10, "source": "樂視", "category": 1 }, { "sid": "IFPgi8e5f918KUkYUQwNg", "name": "Mother/母親", "rank": 83, "isFinished": false, "publishTime": 1516723200000, "updateTime": 1519863389000, "intro": "", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FtTruQfkNCgvARKLWdcuimXrWfPa.jpg?imageView2/2/w/200/interlace/1", "count": 11, "source": "樂視", "category": 1 }, { "sid": "arhQMWqVa3wDnjLB3jGS", "name": "迷霧/Misty", "rank": 93, "isFinished": false, "publishTime": 1517500800000, "updateTime": 1519534209000, "intro": "", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/Fg1va-RL1MSvn68EwnMuEUfLaEMx.jpg?imageView2/2/w/200/interlace/1", "count": 8, "source": "樂視", "category": 1 }, { "sid": "15j4oDeHtYDUaT3pBu9Yy", "name": "加油吧威基基", "rank": 88, "isFinished": false, "publishTime": 1517760000000, "updateTime": 1519784724000, "intro": "", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/FhkySsrfjezJN8avISC_7N6n2Acg.jpg?imageView2/2/w/200/interlace/1", "count": 8, "source": "bilibili", "category": 1 },
安卓UI截圖
點擊"花遊記"
Fiddler捕獲到一個請求
http://api.hanju.koudaibaobao.com/api/series/detailV3?sid=diLIx4HEsJx4bDYf4aEE
{ "rescode": 0,//請求結果 "ts": 1519906835245, "confVer": 735, "series": {//詳細 "sid": "diLIx4HEsJx4bDYf4aEE",//視頻id "name": "花遊記",//名稱 "rank": 77,//排名 "isFinished": false,//是否完結 "publishTime": 1512748800000,//發布時間 /*簡介*/"intro": "<p>取材於中國古典小說《西遊記》,講述了擁有致命頹廢美的齊天大聖孫悟空和擁有獨特世俗本性的三藏法師在2017年魔鬼猖獗黑暗的世界裏尋找光芒的旅程故事,是韓國TVN電視臺將於2017年12月23日首播的周末連續劇</p>\n\n<p><span><span class=\"pl\">導演</span>: <span class=\"attrs\">樸洪均</span></span><br />\n<span><span class=\"pl\">編劇</span>: <span class=\"attrs\">洪靜恩 / 洪美蘭 / 吳承恩</span></span><br />\n<span class=\"actor\"><span class=\"pl\">主演</span>: <span class=\"attrs\"><span><a data=\"star:129\">李昇基</a> / </span><span>吳漣序 / </span></span></span><span class=\"actor\"><span class=\"attrs\"><span>車勝元 / </span></span></span><a data=\"star:74\">李洪基</a><span class=\"actor\"><span class=\"attrs\"><span> / </span><span>金智秀 / </span><span style=\"display: inline;\">李世英 / </span><span style=\"display: inline;\">李艾 / </span><span style=\"display: inline;\">尹寶拉 / </span><span style=\"display: inline;\">成赫 / 鄭帝元 / 張根碩 / 宋宗浩 / 葛素媛 / </span></span></span>俞延靜<br />\n<span class=\"pl\">類型:</span> <span property=\"v:genre\">喜劇</span> / <span property=\"v:genre\">愛情</span> / <span property=\"v:genre\">奇幻</span><br />\n<span class=\"pl\">集數:</span> 20<br />\n<span class=\"pl\">首播:</span> <span content=\"2017-12-23(韓國)\" property=\"v:initialReleaseDate\">2017-12-23(韓國)</span><br />\n<span class=\"pl\">又名:</span> 華遊記 / 和遊記</p>\n\n<p><span property=\"v:summary\">《花遊記》是一部取材於中國古典小說《西遊記》,將其再創造的現代奇幻愛情羅曼史故事。講述了擁有致命頹廢美的齊天大聖孫悟空和三藏法師在2017年魔鬼猖獗黑暗的世界裏尋找光芒的旅程故事。這是一部奇幻劇給人帶來有趣,驚悚劇給人帶來緊張感和刺激,角色喜劇給人帶來搞笑,愛情劇給人帶來心動的劇。題材新穎又陌生,但是為了接地氣,劇中會活用人們通過電視劇,綜藝,小說裏熟知的孫悟空,三藏法師,豬八戒,沙悟凈,牛魔王等角色。</span></p>", "thumb": "http://res.hanju.koudaibaobao.com/hj_res/Fk2BP5EGzFDswZ0KbCLrFV2zvoY4.jpg?imageView2/2/w/200/interlace/1", "count": 18,//集數 "source": "tvn",//來源 "category": 1//類別 }, "playItems": [//播放項目 { "pid": "uJpJqeIpqJ8C7KmGovve",//播放id "serialNo": 1,//集數 "publishTime": 1514071676000,//發布時間 "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0",//鏈接 "srcSite": "愛奇藝",//源站點 "cache": 1//緩存 }, { "pid": "LkTeeFQfA1pdNdC1wHJI", "serialNo": 2, "publishTime": 1514164089000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "euxy3pD_MsMVSegJfXxP", "serialNo": 3, "publishTime": 1515284280000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "IavJ7qYCQK6ZJh0iuoqu", "serialNo": 4, "publishTime": 1515368898000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "ixIGftzYed15UA5ecHK2K", "serialNo": 5, "publishTime": 1515886927000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "k2lHL5ECxsdcRy4WUn0E", "serialNo": 6, "publishTime": 1515973161000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "wV6pDV8feB13bLXppDBZY", "serialNo": 7, "publishTime": 1516491877000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "ApJwmnh3d9z4RmA5kGuL", "serialNo": 8, "publishTime": 1516580948000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "8phsKWRjN0eo5cm2uGZk", "serialNo": 9, "publishTime": 1517101179000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "DcaYcubexLUq9PC6Rr1c", "serialNo": 10, "publishTime": 1517189078000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "15tVC__4verQMXbuMUvuU", "serialNo": 11, "publishTime": 1517687072000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "a9fDlG9dR_1Ahulx5q3eT", "serialNo": 12, "publishTime": 1517781927000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "dMuJfqAaN312DzvMH5rHn", "serialNo": 13, "publishTime": 1518294412000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "2Gyy_JJd68o099ISgCz9", "serialNo": 14, "publishTime": 1518371715000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "flLqw2wD0Jsc05WPZnRW", "serialNo": 15, "publishTime": 1518891683000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "AsbGZIVpg218knPGU2pXH", "serialNo": 16, "publishTime": 1518976239000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "Fsk3SpgEj4utH40k_xCo", "serialNo": 17, "publishTime": 1519496819000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 }, { "pid": "oqUvhJFUSw155tjgjiZ2N", "serialNo": 18, "publishTime": 1519598515000, "srcUrl": "http://m.iqiyi.com/search.html?key=%E8%8A%B1%E6%B8%B8%E8%AE%B0", "srcSite": "愛奇藝", "cache": 1 } ], "forum": 1, "showVideo": 1 }
韓劇TV UWP開發---抓包分析