{"id":187,"date":"2020-09-13T17:39:03","date_gmt":"2020-09-13T09:39:03","guid":{"rendered":"https:\/\/www.lijishi.com\/?p=187"},"modified":"2020-09-13T17:39:03","modified_gmt":"2020-09-13T09:39:03","slug":"python-iqiyiparseapi","status":"publish","type":"post","link":"https:\/\/blog.lijishi.com\/index.php\/2020\/09\/13\/python-iqiyiparseapi\/","title":{"rendered":"Python | IqiyiParseAPI"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-192\" src=\"https:\/\/www.lijishi.com\/wp-content\/uploads\/2020\/12\/timg-1.jpg\" alt=\"\" width=\"610\" height=\"193\" srcset=\"https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/timg-1.jpg 610w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/timg-1-300x95.jpg 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>\u6700\u8fd1\u5728\u5355\u4f4d\u6709\u5c11\u8bb8\u95f2\u6687\uff0c\u53c8\u52a0\u4e0a\u597d\u53cb\u8ba9\u6211\u5e2e\u5fd9\u4e0b\u8f7d\u7231\u5947\u827a\u7684\u8001\u7535\u5f71\uff0c\u4e8e\u662f\u4e4e\u7a81\u53d1\u5947\u60f3\uff0c\u6211\u8981\u4e0d\u8981\u6765\u5c1d\u8bd5\u4e00\u4e0b\u7231\u5947\u827a\u7684\u89e3\u6790\u63a5\u53e3\uff0c\u867d\u7136\u6709\u70b9\u96be\u5ea6\uff0c\u4f46\u662f\u603b\u5f52\u8981\u5c1d\u8bd5\u4e00\u4e0b\u3002<\/p>\n<h3>Step1<\/h3>\n<p>\u6309\u7167\u7ecf\u9a8c\uff0cF12\u4e4b\u540e\u641c\u7d22m3\uff0c\u51fa\u6765\u7684\u7b2c\u4e00\u6761\u7ed3\u679c\u770b\u8d77\u6765\u5c31\u662f\u6700\u7b26\u5408\u8981\u6c42\u7684<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-188\" src=\"https:\/\/www.lijishi.com\/wp-content\/uploads\/2020\/12\/1.png\" alt=\"\" width=\"986\" height=\"980\" srcset=\"https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/1.png 986w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/1-300x298.png 300w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/1-150x150.png 150w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/1-768x763.png 768w\" sizes=\"auto, (max-width: 986px) 100vw, 986px\" \/><\/p>\n<p>\u7b80\u5355\u70b9\u6709\u70b9\u96be\u4ee5\u7f6e\u4fe1\uff0cM3U8\u7684\u5185\u5bb9\u76f4\u63a5\u663e\u793a\u4e86\u51fa\u6765<\/p>\n<p>\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u8fd9\u4e2a\u94fe\u63a5\u662f\u5982\u4f55\u5f97\u5230\u7684\uff0c\u9700\u8981\u54ea\u4e9b\u53c2\u6570\u5462<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-189\" src=\"https:\/\/www.lijishi.com\/wp-content\/uploads\/2020\/12\/2.png\" alt=\"\" width=\"988\" height=\"977\" srcset=\"https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/2.png 988w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/2-300x297.png 300w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/2-768x759.png 768w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-190\" src=\"https:\/\/www.lijishi.com\/wp-content\/uploads\/2020\/12\/3.png\" alt=\"\" width=\"986\" height=\"977\" srcset=\"https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/3.png 986w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/3-300x297.png 300w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/3-150x150.png 150w, https:\/\/blog.lijishi.com\/wp-content\/uploads\/2020\/12\/3-768x761.png 768w\" sizes=\"auto, (max-width: 986px) 100vw, 986px\" \/><\/p>\n<p>\u7ecf\u8fc7\u5bf9\u6bd4\uff0c\u53d1\u73b0\u53c2\u6570\u503c\u7edd\u5927\u591a\u6570\u662f\u56fa\u5b9a\u503c\uff0c\u9700\u8981\u53d8\u5316\u7684\u503c\u5e76\u4e0d\u591a\u3002<\/p>\n<blockquote><p><strong>vid\u00a0 authKey\u00a0 pck\u00a0 tm\u00a0 vf<\/strong><\/p><\/blockquote>\n<ul>\n<li>\u800c\u6839\u636e\u4ee5\u524d\u7684\u7ecf\u9a8c\u53ef\u77e5\uff0cbid\u662f\u8868\u793a\u6e05\u6670\u5ea6\u7684\u53c2\u6570\uff0c600\u5bf9\u5e94\u7684\u662f\u84dd\u51491080PH264\uff0c200\u5bf9\u5e94\u6807\u6e05360PH264\uff0c300\u5bf9\u5e94\u9ad8\u6e05540PH264\uff0c300\u5bf9\u5e94\u8d85\u6e05720PH264\uff0c\u5176\u5b9e\u8fd8\u6709\u4e00\u4e2a\u9690\u85cf\u53c2\u6570\uff0c\u5373620\u5bf9\u5e94\u84dd\u5149\u9ad8\u78011080PH265\u3002<\/li>\n<li>\u5176\u4e2d\u7684vid\u5e94\u8be5\u5c31\u662f\u89c6\u9891\u4ee3\u7801\uff0c\u8fd9\u4e2a\u8fd8\u662f\u53ef\u4ee5\u975e\u5e38\u5bb9\u6613\u62ff\u5230\u7684\uff0c\u76f4\u63a5\u5728\u7f51\u9875\u4e2d\u67e5\u627e\u5c31\u80fd\u5f97\u5230\u3002<\/li>\n<li>tm\u53c2\u6570\u4e5f\u662f\u5f88\u7b80\u660e\u627c\u8981\uff0c\u5c31\u662f\u4e2a\u5e73\u5e73\u65e0\u5947\u7684\u65f6\u95f4\u6233\u7f62\u4e86<\/li>\n<li>\u81f3\u4e8e\u5176\u4e2d\u7684authkey\uff0c\u4e00\u770b\u5c31\u77e5\u9053\u662f\u4e00\u4e2a\u5373\u65f6\u8ba1\u7b97\u51fa\u6765\u7684\u9632\u76d7\u94fekey\uff0c\u597d\u5728danni\u5927\u4f6c\u5df2\u7ecf\u5206\u4eab\u8fc7\u8ba1\u7b97\u65b9\u6cd5\u00a0\u00a0<a href=\"https:\/\/blog.weimo.info\/archives\/381\/\">https:\/\/blog.weimo.info\/archives\/381\/<\/a><\/li>\n<li>\u4f46pck\u53c2\u6570\uff0c\u4e00\u65f6\u6ca1\u627e\u5230\u53d8\u5316\u7684\u539f\u56e0\uff0c\u6240\u4ee5\u53bb\u7ffb\u4e86\u7ffbcookie\uff0c\u53d1\u73b0\u4e86\u79d8\u5bc6\u3002\u5176\u5b9epck\u5c31\u662fcookie\u4e2d\u7684P0001\u53c2\u6570\uff0c\u53ea\u4e0d\u8fc7\u4e2d\u95f4\u6211\u91cd\u65b0\u767b\u5f55\u4e86\u4e00\u6b21\uff0c\u6070\u597d\u53d8\u5316\u4e86\uff0c\u8fd9\u624d\u8ba9\u6211\u201c\u56e0\u7978\u5f97\u798f\u201d\uff0c\u4e0d\u7136\u4e0d\u77e5\u9053\u6211\u8981\u4ec0\u4e48\u65f6\u5019\u624d\u77e5\u9053\u8fd9\u4e2a\u95ee\u9898\u3002<\/li>\n<li>\u800c\u4e14\uff0c\u6211\u8fd8\u5728cookie\u4e2d\u6070\u597d\u53d1\u73b0\u4e86dfp\u4e5f\u662f\u5728cookie\u4e2d\u7684\uff0cuid\u4e5f\u662fcookie\u4e2d\u7684P0003\u53c2\u6570\uff0c\u4e0d\u8fc7\u597d\u5728\u8fd9\u4e24\u4e2a\u5e76\u65e0\u53d8\u5316\u3002<\/li>\n<li>\u73b0\u5728\u5c31\u5269\u4e0b\u4e86vf\u8fd9\u4e00\u4e2a\u53c2\u6570\u4e86\uff0c\u5176\u5b9e\u8fd9\u4e2a\u53c2\u6570\u4e5f\u5df2\u7ecf\u6709\u5927\u4f6c\u7834\u89e3\u4e86\uff0c\u5b9e\u73b0\u7684\u8fc7\u7a0b\u7a0d\u663e\u590d\u6742\uff0c\u6211\u4e5f\u5728\u62dc\u8bfb\u8fc7\u7a0b\u4e2d\uff0c\u4f46\u535a\u4e3b\u5df2\u7ecf\u7528Node.js\u5b9e\u73b0\u4e86\uff0c\u6211\u53ef\u4ee5\u76f4\u63a5\u5957\u7528\u4ee3\u7801\uff0c\u5229\u7528\u817e\u8baf\u4e91\u51fd\u6570\u76f4\u63a5\u4ee5\u63a5\u53e3\u7684\u5f62\u5f0f\u5b9e\u73b0\uff0c\u8981\u662f\u60f3\u4ed4\u7ec6\u5b66\u4e60\u7684\u53ef\u4ee5\u79fb\u6b65\u535a\u4e3b\u7684\u539f\u6587\u7ae0\uff0c<a href=\"https:\/\/zsaim.github.io\/2019\/08\/23\/Iqiyi-cmd5x-Analysis\/\">https:\/\/zsaim.github.io\/2019\/08\/23\/Iqiyi-cmd5x-Analysis\/<\/a><\/li>\n<\/ul>\n<p><strong>\u81f3\u6b64\uff0c\u5168\u90e8\u53c2\u6570\u5df2\u7ecf\u6784\u5efa\u5b8c\u6bd5\uff0c\u5229\u7528python\u4e2d\u7684requests\uff0c\u643a\u5e26headers\u548ccookies\uff0c\u8fdb\u884c\u6a21\u62df\u8c03\u7528\uff0c\u5373\u53ef\u62ff\u5230\u89c6\u9891\u64ad\u653e\u7684M3U8<\/strong><\/p>\n<h3>Step2<\/h3>\n<p>\u5176\u5b9e\u6559\u7a0b\u5230\u8fd9\u91cc\u5c31\u5e94\u8be5\u7ed3\u675f\u4e86\u7684\uff0c\u4f46\u95ee\u9898\u662f\uff0c\u6211\u4eec\u7684\u8bf7\u6c42\u53c2\u6570\u4e2d\u662f\u5e26\u6709cookie\u7684\uff0c\u8fd9\u73a9\u610f\u53ef\u662f\u4f1a\u53d8\u5316\u7684\uff0c\u5c31\u6bd4\u5982\u6211\u91cd\u65b0\u767b\u5f55\u540e\uff0c\u5f88\u6709\u53ef\u80fd\u5e26\u6765P0001 \/ P0003\u7684\u53d8\u5316\u3002\u800c\u4e14\u6839\u636e\u6d4b\u8bd5\u548c\u4e00\u4e9b\u5927\u4f6c\u7684\u6587\u7ae0\u53ef\u77e5\uff0cP0001\u7684\u53d8\u5316\u65f6\u95f4\u5728\u4e00\u5929\u5de6\u53f3\uff0c\u6211\u603b\u4e0d\u80fd\u6bcf\u5929\u90fd\u91cd\u5199\u4ee3\u7801\u5427\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u6211\u5229\u7528\u4e91\u5bf9\u8c61\u50a8\u5b58\uff0c\u5728\u4e91\u7aef\u521b\u5efa\u4e00\u4e2atxt\u6587\u672c\uff0c\u5c06\u6613\u53d8\u5316\u7684P0001\u5b58\u50a8\u5728\u4e91\u7aef\uff0c\u6bcf\u6b21\u83b7\u53d6M3U8\u4e4b\u524d\u8c03\u53d6\u4e91\u7aef\u7684cookie\uff0c\u800c\u4e14\u6211\u5199\u4e86\u4e00\u4e2a\u63a5\u53e3\uff0c\u53ef\u4ee5\u7b80\u5355\u5730\u4ee5\u94fe\u63a5\u8bbf\u95ee\u7684\u65b9\u5f0f\u4fee\u6539\u4e91\u7aef\u7684P0001\u53c2\u6570\u3002\u800c\u540e\u6211\u5728\u7231\u5947\u827a\u7684\u7f51\u9875\u4e2d\u690d\u5165js\u4ee3\u7801\uff0c\u6bcf\u6b21\u8bbf\u95ee\u7231\u5947\u827a\u7f51\u7ad9\u90fd\u4f1a\u8c03\u7528\u94fe\u63a5\u5373\u4e0a\u4f20P0001\u53c2\u6570\uff0c\u5b9e\u73b0\u4e86\u6700\u5927\u7684\u81ea\u52a8\u5316\u3002<\/p>\n<h3>Step3<\/h3>\n<p>\u5176\u5b9e\u6559\u7a0b\u5230\u8fd9\u91cc\u4ecd\u7136\u6ca1\u7ed3\u675f\uff0c\u6211\u5df2\u7ecf\u8bf4\u4e86\uff0c\u6211\u505a\u7684\u662f\u4e2a\u63a5\u53e3\uff0c\u6211\u4eec\u4ece\u7231\u5947\u827a\u7684\u63a5\u53e3\u4e2d\u5f97\u5230\u7684\u662fM3U8\u7684\u5185\u5bb9\uff0c\u800c\u6211\u4eec\u5e73\u65f6\u7528\u7684\u66f4\u591a\u7684\u662fM3U8\u7684\u94fe\u63a5\uff0c\u6bd5\u7adf\u77ed\u561b\u3002\u6240\u4ee5\u540c\u6837\u5229\u7528\u4e91\u5bf9\u8c61\u50a8\u5b58\uff0c\u5728\u672c\u5730\u5c06M3U8\u5185\u5bb9\u5199\u5165\u6587\u672c\uff0c\u4e0a\u4f20\u81f3\u4e91\u7aef\uff0c\u4ee5\u94fe\u63a5\u7684\u5f62\u5f0f\u8fd4\u56de\u5373\u53ef\u3002\u81f3\u4e8e\u8d39\u7528\u7684\u95ee\u9898\u4e5f\u4e0d\u7528\u62c5\u5fc3\uff0c\u817e\u8baf\u4e91\u3001\u4e03\u725b\u4e91\u4ee5\u53ca\u53c8\u62cd\u4e91\u6bcf\u6708\u90fd\u6709\u4e00\u5b9a\u7684\u514d\u8d39\u989d\u5ea6\uff0c\u4e2a\u4eba\u5f00\u53d1\u8005\u4f7f\u7528\u8db3\u77e3\u3002<\/p>\n<h3>\u00b7 \u540e\u8bb0<\/h3>\n<p>\u5c31\u5b9e\u73b0\u6b64\u63a5\u53e3\u800c\u8a00\uff0c\u5e76\u4e0d\u662f\u975e\u5e38\u96be\uff0c\u56e0\u4e3a\u5df2\u7ecf\u6709\u5404\u8def\u5927\u4f6c\u5e2e\u6211\u626b\u6e05\u4e86\u969c\u788d\uff0c\u4e4b\u540e\u8981\u5b66\u4e60\u7684\u5c31\u662f\u5982\u4f55\u83b7\u53d6\u66f4\u591a\u7248\u672c\u7684\u89c6\u9891\u548c\u66f4\u591a\u53c2\u6570\u7684\u542b\u4e49\uff0c\u8fd9\u624d\u662f\u5b66\u4e60\u7684\u771f\u6b63\u610f\u4e49\u3002<\/p>\n<p>\u548c\u4e4b\u524d\u4e00\u6837\uff0c\u6211\u8fd8\u662f\u5f88\u539a\u9053\u7684\uff0c\u63d0\u4f9b\u4e86\u767d\u5ad6\u7684\u5165\u53e3\uff0capi.sometools.online\/iqiyipc\/<\/p>\n<blockquote><p><strong>\u4ee5\u4e0a\u4ec5\u4f9b\u4ea4\u6d41\u5b66\u4e60\uff0c\u8bf7\u52ff\u7528\u4e8e\u975e\u6cd5\u7528\u9014\uff0c\u4fb5\u5220\u3002<\/strong><\/p><\/blockquote>\n<ul>\n<li>\n<h3>\u76f8\u5173\u8d44\u6599<\/h3>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/GaryNotGay\/VideoParseApi\/\">GitHub\u4e0b\u8f7d\u5668\u5f00\u6e90\u4ee3\u7801<\/a><\/p>\n<p><a href=\"http:\/\/api.lijishi.com\/release\/iqiyipc\/https:\/\/www.iqiyi.com\/v_bls6g65uj4.html\">\u63a5\u53e3\u793a\u610f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u5355\u4f4d\u6709\u5c11\u8bb8\u95f2\u6687\uff0c\u53c8\u52a0\u4e0a\u597d\u53cb\u8ba9\u6211\u5e2e\u5fd9\u4e0b\u8f7d\u7231\u5947\u827a\u7684\u8001\u7535\u5f71\uff0c\u4e8e\u662f\u4e4e\u7a81\u53d1\u5947\u60f3\uff0c\u6211\u8981\u4e0d\u8981\u6765\u5c1d\u8bd5\u4e00\u4e0b\u7231\u5947\u827a\u7684\u89e3\u6790\u63a5\u53e3 &hellip; <a href=\"https:\/\/blog.lijishi.com\/index.php\/2020\/09\/13\/python-iqiyiparseapi\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Python | IqiyiParseAPI<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":193,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[25,47,53],"class_list":["post-187","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-develop","tag-python","tag-47","tag-53"],"_links":{"self":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/media\/193"}],"wp:attachment":[{"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lijishi.com\/index.php\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}