{"id":673,"date":"2019-04-05T00:59:56","date_gmt":"2019-04-04T16:59:56","guid":{"rendered":"https:\/\/flandre-scarlet.moe\/blog\/?p=673"},"modified":"2020-08-15T19:40:23","modified_gmt":"2020-08-15T11:40:23","slug":"pixivspider-p-%e7%ab%99%e7%88%ac%e8%99%ab%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/flandre-scarlet.moe\/blog\/673\/","title":{"rendered":"pixivspider \u2013 P \u7ad9\u722c\u866b\u5de5\u5177"},"content":{"rendered":"<h2>\u4e3b\u8981\u529f\u80fd<\/h2>\n<p>\u6839\u636e\u5b9a\u4e49\u7684 ID \u5217\u8868\u4e0b\u8f7d\u6bcf\u4e2a\u753b\u5e08\u7684\u6240\u6709\u63d2\u753b<br \/>\n<a href=\"https:\/\/flandre-scarlet.moe\/blog\/wp-content\/uploads\/2019\/05\/pixivspider-2.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/flandre-scarlet.moe\/blog\/wp-content\/uploads\/2019\/05\/pixivspider-2.png\" width=\"570\"><\/a><\/p>\n<p><a href=\"https:\/\/flandre-scarlet.moe\/blog\/wp-content\/uploads\/2019\/05\/pixivspider-1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/flandre-scarlet.moe\/blog\/wp-content\/uploads\/2019\/05\/pixivspider-1.png\" width=\"570\"><\/a><\/p>\n<h3>\u4e0b\u8f7d\u94fe\u63a5<\/h3>\n<p><a href=\"https:\/\/github.com\/Kerisa\/PixivSpider\" target=\"_blank\" rel=\"noopener noreferrer\">PixivSpider<\/a><\/p>\n<h3>\u5982\u4f55\u4f7f\u7528<\/h3>\n<p><!--more--><\/p>\n<ol>\n<li>\u9700\u8981\u5b89\u88c5 python 3.7 \u73af\u5883\uff0c\u5e76\u5b89\u88c5 demjson \u4f9d\u8d56\u5e93\u3002<\/li>\n<li>\u89e3\u538b\u6587\u4ef6\u5305\uff0c\u5728 pixivspider-data \u76ee\u5f55\u4e0b\u7684 config.ini \u6587\u4ef6\u4e2d\u586b\u5165\u6709\u6548\u7684 P \u7ad9\u8d26\u53f7\u4ee5\u53ca\u5bf9\u5e94\u5bc6\u7801\u7528\u4e8e\u6b63\u5e38\u8bbf\u95ee P \u7ad9\u3002\u8d26\u53f7\u4e2d\u7684\u6d4f\u89c8\u9650\u5236\u9009\u9879\u4e0d\u6253\u5f00\u4f1a\u5f71\u54cd\u90e8\u5206\u63d2\u753b\u7684\u4e0b\u8f7d\uff0c\u9700\u8981\u4e0b\u8f7d\u5219\u5728\u7f51\u9875\u4e2d\u6253\u5f00\u3002<\/li>\n<li>\u6dfb\u52a0\u51c6\u5907\u4e0b\u8f7d\u7684\u753b\u5e08 ID\uff0c\u4ee5\u4e0b\u65b9\u5f0f\u9009\u4e00\u79cd\u5373\u53ef\n<ul>\n<li>\u6570\u636e\u5e93\u6587\u4ef6\u4e0d\u5b58\u5728\uff08\u9996\u6b21\u4f7f\u7528\uff09\uff1a\u4f7f\u7528\u5bfc\u5165\u65b9\u5f0f\u81ea\u52a8\u751f\u6210\uff0c\u53c2\u770b<a href=\"\/blog\/?p=673#import\">\u5bfc\u5165<\/a>\u90e8\u5206\uff0c\u6bd4\u8f83\u63a8\u8350\u6b64\u79cd\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5feb\u6377\u3002<\/li>\n<li>\u6570\u636e\u5e93\u6587\u4ef6\u4e0d\u5b58\u5728\uff08\u9996\u6b21\u4f7f\u7528\uff09\uff1a\u76f4\u63a5\u8fd0\u884c\n<pre>python pixivspider<\/pre>\n<p>\u547d\u4ee4\uff08\u547d\u4ee4\u884c\u7684\u5de5\u4f5c\u76ee\u5f55\u8bbe\u7f6e\u4e3a pixivspider \u6240\u5728\u76ee\u5f55\uff09\uff0c\u4f1a\u81ea\u52a8\u5728 pixivspider-data \u76ee\u5f55\u4e2d\u751f\u6210 download.db \u6570\u636e\u5e93\u6587\u4ef6\uff0c\u968f\u540e\u624b\u52a8\u6dfb\u52a0 ID \u5230\u6570\u636e\u5e93\u4e2d\uff0c\u89c1\u4e0b\u65b9\u624b\u52a8\u6dfb\u52a0\u90e8\u5206\u3002<\/li>\n<li>\u624b\u52a8\u6dfb\u52a0\/\u4fee\u6539\u753b\u5e08 ID \u5217\u8868\uff1a\u4f7f\u7528 DB Browser for SQLite \uff08<a href=\"https:\/\/sqlitebrowser.org\/dl\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u4e0b\u8f7d<\/a>\uff09\u6253\u5f00\u5df2\u5b58\u5728\u7684\u6570\u636e\u5e93\u6587\u4ef6 download.db \uff0c\u5207\u6362\u5230 creators \u6570\u636e\u8868\uff0c\u624b\u52a8\u6dfb\u52a0\/\u4fee\u6539\u76f8\u5e94\u7684 ID\uff0c\u6700\u540e\u4fdd\u5b58\u9000\u51fa\u5373\u53ef<a href=\"https:\/\/flandre-scarlet.moe\/blog\/wp-content\/uploads\/2019\/05\/pixivspider-4.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/flandre-scarlet.moe\/blog\/wp-content\/uploads\/2019\/05\/pixivspider-4.png\" width=\"570\"><\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u8fd0\u884c\u4e4b\u524d\u9700\u8981\u786e\u4fdd\u80fd\u6b63\u5e38\u8bbf\u95ee P \u7ad9\uff0c\u56e0\u4e3a\u811a\u672c\u6ca1\u505a\u4ee3\u7406\u7684\u5904\u7406\uff0c\u6240\u4ee5\u4ee3\u7406\u9700\u8981\u8bbe\u4e3a\u5168\u5c40\u4ee5\u4fbf\u96e8\u9732\u5747\u6cbe\uff0c\u80fd\u6709\u5916\u7f51\u673a\u5668\u7684\u8bdd\u63a8\u8350\u76f4\u63a5\u4ecd\u4e0a\u53bb\u8dd1\u3002\u81f3\u4e8e\u5982\u4f55\u6539\u5584\u56fd\u5185\u8fd9\u5dee\u52b2\u7684\u7f51\u7edc\u73af\u5883\u8fd9\u4e00\u6b65\u4e0d\u5728\u6b64\u6587\u8bf4\u660e\u8303\u56f4\u3002\u3002\u3002<\/li>\n<li>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c python pixivspider \u5373\u53ef\u5f00\u59cb\u4e0b\u8f7d\u3002\u4e0b\u8f7d\u6210\u529f\u548c\u4e0b\u8f7d\u5931\u8d25\u7684\u63d2\u753b\u4f1a\u5206\u522b\u8bb0\u5f55\u5230\u6570\u636e\u5e93\u4e2d\u7684 illust \u548c download_failed \u6570\u636e\u8868\u4e2d\u3002<\/li>\n<li>\u53bb pixivspider-data\/downloads \u76ee\u5f55\u6536\u53d6\u5df2\u7ecf\u4e0b\u8f7d\u7684\u63d2\u753b\u3002<\/li>\n<\/ol>\n<h3 id=\"import\">\u5bfc\u5165<\/h3>\n<p>\u4e3b\u8981\u662f\u7528\u6765\u8f6c\u79fb\u539f\u6709\u7684\u6570\u636e\uff0c\u4e5f\u53ef\u7528\u4e8e\u521d\u59cb\u5316\u753b\u5e08 ID \u5217\u8868\u3002<\/p>\n<ol>\n<li>\u5728 pixivspider \u6587\u4ef6\u5939\u6240\u5728\u76ee\u5f55\u4e0b\u63d0\u4f9b\u4e00\u4e2a\u5b58\u6709\u753b\u5e08 ID \u7684\u6587\u672c\u6587\u4ef6 PixivIdList.txt\uff0c\u683c\u5f0f\u4e3a\u6bcf\u884c\u4e00\u4e2a ID\uff0c\u8fd0\u884c\n<pre>python pixivspider --import<\/pre>\n<p>\u547d\u4ee4\u8fdb\u884c\u5bfc\u5165\u3002\u56e0\u4e3a ID \u4e0d\u80fd\u4e0e\u5df2\u6709\u7684\u91cd\u590d\uff0c\u6240\u4ee5\u5728\u5bfc\u5165\u524d\u8981\u786e\u8ba4\u6570\u636e\u5e93\u4e2d\u662f\u5426\u5b58\u5728\u4e0e PixivIdList.txt \u6587\u4ef6\u4e2d\u76f8\u540c\u7684 ID\uff0c\u4ee5\u514d\u5bfc\u5165\u5931\u8d25\u3002<\/li>\n<\/ol>\n<h3>\u5176\u4ed6<\/h3>\n<ol>\n<li>\u4e0b\u4e00\u6b21\u8fd0\u884c\u65f6\u4f1a\u81ea\u884c\u4e0b\u8f7d\u6240\u6709\u5931\u8d25\u7684\u63d2\u753b\uff0c\u5f53\u6210\u529f\u4e0b\u8f7d\u540e\u4f1a\u81ea\u52a8\u4ece\u5931\u8d25\u8bb0\u5f55\u4e2d\u79fb\u9664\u3002<\/li>\n<li>\u7a0b\u5e8f\u4f7f\u7528\u6570\u636e\u5e93\u4e2d\u7684\u8bb0\u5f55\u5224\u65ad\u63d2\u753b\u662f\u5426\u5df2\u7ecf\u4e0b\u8f7d\uff0c\u56e0\u6b64\u53ef\u4ee5\u968f\u610f\u5904\u7406 downloads \u76ee\u5f55\u4e2d\u5df2\u4e0b\u8f7d\u7684\u63d2\u753b\u3002\u4e0b\u6b21\u4e0b\u8f7d\u65f6\u4ecd\u4f1a\u8df3\u8fc7\u8fd9\u4e9b\u6587\u4ef6\u3002<\/li>\n<li>\u5411\u4e0d\u77e5\u9053\u662f\u5426\u5b58\u5728\u7684\u8bfb\u8005\u4eec\u6c42 star (\u0e51\u2022\u0301 \u2083 \u2022\u0300\u0e51)<\/li>\n<\/ol>\n<p>\u203b2019-07-07\uff1a\u4eca\u5929\u811a\u672c\u62ff\u6765\u4e00\u8dd1\u53d1\u73b0\u767b\u5f55\u4e0d\u4e86\uff0c\u539f\u6765 P \u7ad9\u4e0a\u4e86\u80a1\u6c9f reCAPTCHA&#8230;\u6210\u5929\u641e\u4e8b\u60c5\u3002\u8bd5\u4e86\u8bd5\u53d1\u73b0\uff08\u7528\u6d4f\u89c8\u5668\u63d2\u4ef6\uff09\u628a cookie \u63d0\u53d6\u51fa\u6765\uff0c\u628a P \u7ad9\u4e2d PHPSESSID \u5b57\u6bb5\u7684 value \u548c expire \u63d0\u53d6\u51fa\u6765\u8986\u76d6\u5230 PixivCookie.txt \u4e2d\u5c31\u53ef\u4ee5\u4ee5\u5df2\u767b\u5f55\u7684\u8eab\u4efd\u7ee7\u7eed\u4e0b\u8f7d\u4e5b\u25e1\u4e5b\u3002\u987a\u4fbf\u63d0\u4f9b\u4e00\u4efd PixivCookie.txt \u7684\u6a21\u677f<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># Netscape HTTP Cookie File\r\n# http:\/\/curl.haxx.se\/rfc\/cookie_spec.html\r\n# This is a generated file!  Do not edit.\r\n\r\n.pixiv.net\tTRUE\t\/\tTRUE\t(expire\u503c\u8986\u76d6)\tPHPSESSID\t(value\u503c\u8986\u76d6)\r\n.pixiv.net\tTRUE\t\/\tTRUE\t1719677052\tp_ab_d_id\t1000246005\r\n.pixiv.net\tTRUE\t\/\tTRUE\t1719677052\tp_ab_id\t7\r\n.pixiv.net\tTRUE\t\/\tTRUE\t1719677052\tp_ab_id_2\t1\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u8981\u529f\u80fd \u6839\u636e\u5b9a\u4e49\u7684 ID \u5217\u8868\u4e0b\u8f7d\u6bcf\u4e2a\u753b\u5e08\u7684\u6240\u6709\u63d2\u753b \u4e0b\u8f7d\u94fe\u63a5 PixivSpider \u5982\u4f55\u4f7f\u7528&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/flandre-scarlet.moe\/blog\/673\/\">\u9605\u8bfb\u66f4\u591a<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[89,87,88,86],"class_list":["post-673","post","type-post","status-publish","format-standard","hentry","category-programs","tag-pixiv","tag-python","tag-p","tag-86"],"_links":{"self":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts\/673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/comments?post=673"}],"version-history":[{"count":2,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts\/673\/revisions"}],"predecessor-version":[{"id":1393,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/posts\/673\/revisions\/1393"}],"wp:attachment":[{"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/media?parent=673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/categories?post=673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flandre-scarlet.moe\/blog\/wp-json\/wp\/v2\/tags?post=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}