{"id":316378,"date":"2021-02-04T04:19:42","date_gmt":"2021-02-03T20:19:42","guid":{"rendered":"http:\/\/4563.org\/?p=316378"},"modified":"2021-02-04T04:19:42","modified_gmt":"2021-02-03T20:19:42","slug":"baidupcs-py-%e7%99%be%e5%ba%a6%e7%bd%91%e7%9b%98-api-%e5%ae%a2%e6%88%b7%e7%ab%af","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=316378","title":{"rendered":"BaiduPCS-Py \u767e\u5ea6\u7f51\u76d8 API &amp; \u5ba2\u6237\u7aef"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  BaiduPCS-Py \u767e\u5ea6\u7f51\u76d8 API &amp; \u5ba2\u6237\u7aef               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PeterD <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h1>BaiduPCS-Py \u767e\u5ea6\u7f51\u76d8 API &amp; \u5ba2\u6237\u7aef<\/h1>\n<p> <\/p>\n<p>https:\/\/github.com\/PeterDing\/BaiduPCS-Py<\/p>\n<p>BaiduPCS-Py \u662f\u7b2c\u4e09\u65b9\u7684\u767e\u5ea6\u7f51\u76d8 API \u548c\u4e00\u4e2a\u547d\u4ee4\u884c\u5ba2\u670d\u7aef\u3002\u8fd0\u884c\u5728 Python &gt;= 3.6<\/p>\n<p>\u5b83\u662f https:\/\/github.com\/PeterDing\/iScript\/blob\/master\/pan.baidu.com.py \u7684\u91cd\u6784\u7248\u3002<\/p>\n<h2>\u5b89\u88c5<\/h2>\n<pre><code>pip3 install BaiduPCS-Py <\/code><\/pre>\n<h2>\u767e\u5ea6\u7f51\u76d8 API<\/h2>\n<p>BaiduPCS-Py \u7684\u767e\u5ea6\u7f51\u76d8 API \u53ea\u4f9d\u8d56 <code>requests<\/code>\uff0c\u65b9\u4fbf\u7528\u6237\u5f00\u53d1\u81ea\u5df1\u7684\u8fd0\u7528\u3002<\/p>\n<pre><code>from baidupcs_py.baidupcs import BaiduPCSApi  api = BaiduPCSApi(bduss=bduss, cookies=cookies) <\/code><\/pre>\n<h2>\u547d\u4ee4\u884c\u5ba2\u670d\u7aef<\/h2>\n<p>\u547d\u4ee4\u884c\u5ba2\u670d\u7aef\u652f\u6301\u591a\u4e2a\u5e10\u53f7\u548c\u4e0b\u9762\u7684\u5e38\u7528\u547d\u4ee4\u3002<\/p>\n<ul>\n<li>\u6dfb\u52a0\u7528\u6237<\/li>\n<li>\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u4fe1\u606f<\/li>\n<li>\u66f4\u65b0\u7528\u6237\u4fe1\u606f<\/li>\n<li>\u663e\u793a\u6240\u6709\u7528\u6237<\/li>\n<li>\u5207\u6362\u5f53\u524d\u7528\u6237<\/li>\n<li>\u5220\u9664\u4e00\u4e2a\u7528\u6237<\/li>\n<li>\u6587\u4ef6\u64cd\u4f5c<\/li>\n<li>\u5207\u6362\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55<\/li>\n<li>\u5217\u51fa\u7f51\u76d8\u8def\u5f84\u4e0b\u7684\u6587\u4ef6<\/li>\n<li>\u641c\u7d22\u6587\u4ef6<\/li>\n<li>\u663e\u793a\u6587\u4ef6\u5185\u5bb9<\/li>\n<li>\u521b\u5efa\u76ee\u5f55<\/li>\n<li>\u79fb\u52a8\u6587\u4ef6<\/li>\n<li>\u6587\u4ef6\u91cd\u547d\u540d<\/li>\n<li>\u62f7\u8d1d\u6587\u4ef6<\/li>\n<li>\u5220\u9664\u6587\u4ef6<\/li>\n<li>\u4e0b\u8f7d\u6587\u4ef6<\/li>\n<li>\u64ad\u653e\u5a92\u4f53\u6587\u4ef6<\/li>\n<li>\u4e0a\u4f20\u6587\u4ef6<\/li>\n<li>\u540c\u6b65\u672c\u5730\u76ee\u5f55\u5230\u8fdc\u7aef<\/li>\n<li>\u5206\u4eab\u6587\u4ef6<\/li>\n<li>\u5217\u51fa\u5206\u4eab\u94fe\u63a5<\/li>\n<li>\u53d6\u6d88\u5206\u4eab\u94fe\u63a5<\/li>\n<li>\u4fdd\u5b58\u5176\u4ed6\u7528\u6237\u5206\u4eab\u7684\u94fe\u63a5<\/li>\n<li>\u6dfb\u52a0\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1<\/li>\n<li>\u5217\u51fa\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1<\/li>\n<li>\u6e05\u9664\u5df2\u7ecf\u4e0b\u8f7d\u5b8c\u548c\u4e0b\u8f7d\u5931\u8d25\u7684\u4efb\u52a1<\/li>\n<li>\u53d6\u6d88\u4e0b\u8f7d\u4efb\u52a1<\/li>\n<li>\u5220\u9664\u6240\u6709\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1<\/li>\n<\/ul>\n<p>\u76ee\u524d BaiduPCS-Py \u53ea\u5728 Macos \u548c Linux \u4e0a\u8fdb\u884c\u4e86\u6d4b\u8bd5\u3002 \u5728 Windows \u4e0a\u53ef\u80fd\u6709\u4e00\u4e9b\u95ee\u9898\u3002\u63a8\u8350\u5728 WSL \u4e0a\u8fd0\u884c\u3002<\/p>\n<p>\u5927\u5bb6\u968f\u4fbf\u73a9 \ud83d\ude09<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5060024\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : suzic <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             m1 mac \u62a5\u9519<br \/>System ERROR: type object &#8216;MeDownloader&#8217; has no attribute &#8216;_futures&#8217;<br \/>python \u7248\u672c 3.9.1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060025\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : PeterD <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @suzic \u4fee\u590d\u4e86\u3002<\/p>\n<p>\u73b0\u5728\u9ed8\u8ba4\u4e0b\u8f7d\u5668\u4e5f\u652f\u6301\u65ad\u7eed\u4e0b\u8f7d\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060026\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hanguofu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bf7\u95ee\u4ec0\u4e48\u662f \u201d\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1\u201c \u554a \uff1f \u600e\u6837\u624d\u80fd\u77e5\u9053 \uff08\u79bb\u7ebf\uff09\u4e0b\u8f7d\u4efb\u52a1\u7684\u8fdb\u5ea6\u554a \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060027\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : PeterD <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hanguofu \u53ef\u4ee5\u770b\u770b\u8fd9\u4e2a \u300a\u767e\u5ea6\u4e91\u79bb\u7ebf\u4e0b\u8f7d\u6559\u7a0b\u300b https:\/\/www.douban.com\/note\/694555704\/<\/p>\n<p>\u67e5\u770b\u79bb\u7ebf\u4e0b\u8f7d\u8fdb\u5ea6\u89c1 https:\/\/github.com\/PeterDing\/BaiduPCS-Py#%E5%88%97%E5%87%BA%E7%A6%BB%E7%BA%BF%E4%B8%8B%E8%BD%BD%E4%BB%BB%E5%8A%A1                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>BaiduPCS-Py \u767e\u5ea6\u7f51\u76d8 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/316378"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316378"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/316378\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316378"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}