{ "info": { "author": "Eunchul, Song", "author_email": "eunchulsong9@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# dcinside-python3-api\nDeadly simple non official dcinside api for python3\n```python\n# \ud504\ub85c\uadf8\ub798\ubc0d \uac24\ub7ec\ub9ac \uae00 \ud5e4\ub354 \ubb34\ud55c \ud06c\ub864\ub9c1(\ube60\ub984)\nfor doc in dc_api.board(board_id=\"programming\", skip_contents=True):\n print(doc[\"id\"], doc[\"title\"], doc[\"author\"], doc[\"date\"]) \n# => \"131293\"\n# => \"\ub554\uac10 \ubc97\uc5b4\ub098\ub294\ubc95.tip \u3147\u3147(10.42) 1:41\"\n# => \"\uc65c \uc774\uac70 \uc548\ub3fc\ub0d0? \u3147\u3147(192.231) 1:40\"\n# => ...\n```\n```python\n# \ud504\ub85c\uadf8\ub798\ubc0d \uac24\ub7ec\ub9ac \uae00\ub0b4\uc6a9, \uc774\ubbf8\uc9c0, \ub313\uae00 \ud3ec\ud568 \ubb34\ud55c \ud06c\ub864\ub9c1(\ub290\ub9bc)\nfor doc in dc_api.board(board_id=\"programming\"):\n print(doc[\"contents\"]) # => \"\u3157\u315c\u3151\\n\ubbf8\uce5c\ub2e4..\"\n print(doc[\"images\"]) # => \"[imgsrc1, imgsrc2, ...]\"\n for com in doc[\"comments\"]:\n print(com[\"author\"], com[\"contents\"], com[\"date\"])\n # => \"\u3147\u3147(10.42) \ub098 \ub0a8\uc794\ub370 \uc774\ub7f0\uac70 \ubcc4\ub85c 10:20\"\n```\n```python\n# \ub313\uae00\uc4f0\uae30\ndc_api.write_comment(board_id=\"programming\", doc_id=\"149123\", name=\"\u3147\u3147\", pw=\"1234\", contents=\"\u3147\u3148\")\n# \ub85c\uadf8\uc778 \ud6c4 \uae00\uc4f0\uae30\ndc_api.login(id=\"SAMPLE_ID\", pw=\"SAMPLE_PW\")\ndc_api.write_document(board_id=\"programming\", title=\"\ud760..\uc88b\ub124\", contents=\"\uae30\ubd80\ub2c8\uac00 \uc88b\ub124\")\ndc_api.write_comment(board_id=\"programming\", doc_id=\"149123\", contents=\"\uc124\ub9ac\")\n```\n\n# Dependency\npython3 requests, lxml \n\n# Usage\nPlace dc_api.py in your working directory\n\nor install through pip\n\n```\npip3 install --user dc_api\n```\n\n```python\nimport dc_api\n\n# full API\n# for doc in dc_api.board(board_id=\"programming\", num=5, start_page=2, skip_contents=True):\n\n# full attributes of document and comment\nfor doc in dc_api.board(board_id=\"programming\"):\n print(doc[\"id\"]) # => \"835027\"\n print(doc[\"title\"]) # => \"\ub554\uac10 \ubc97\uc5b4\ub098\ub294\ubc95.tip\"\n print(doc[\"author\"]) # => \"\u3147\u3147(10.20)\"\n print(doc[\"has_image\"]) # => True\n print(doc[\"time\"]) # => \"1:41\"\n print(doc[\"comment_num\"])# => 3\n print(doc[\"voteup_num\"]) # => 0\n print(doc[\"view_num\"]) # => 14\n # Belows are None if parameter skip_contents=True\n print(doc[\"contents\"]) # => \"\uc790\ubc14\ub97c \ud55c\ub2e4\" \n print(doc[\"imgs\"]) # => [\"http://static.dcinside.com/1o2i3joie\", ...]\n print(doc[\"comments\"]) # => generator\n for com in doc[\"comments\"]:\n print(com[\"id\"]) # => \"123123\"\n print(com[\"parent_id\"]) # => \"123122\"\n print(com[\"time\"]) # => \"1:55\"\n print(com[\"author\"]) # => \"\u3147\u3147(192.23)\"\n print(com[\"contents\"]) # => \"\uac1c\uc194 \u3134\u3134\"\n if com[\"dccon\"]: \n print(com[\"dccon\"]) # => \"http://dcimg5.dcinside.com/dccon.php?....\"\n\n \n# print document contents, images, and comments\ncontents, images, comments = dc_api.document(board_id=\"programming\", doc_no=\"835027\")\nprint(contents, images, comments)\n# => \"\u3157\u315c\u3151\\n\u3157\u315c\u3151.. [imgsrc1, imgsrc2, ..] \"\n\n# write doc\ndoc_id = dc_api.write_document(board_id=\"programming\",\n name=\"\uc810\uc9c4\uc801\uc790\uc0b4\", pw=\"1234\", \n title=\"\uc81c\ubaa9\", contents=\"\ub0b4\uc6a9\")\n# modify doc\ndoc_id = dc_api.modify_document(board_id=\"programming\", doc_id=doc_id, \n name=\"\uc584\ud30c\uace0\", pw=\"1234\", \n title=\"\uc218\uc815\ub41c \uc81c\ubaa9\", contents=\"\uc218\uc815\ub41c \ub0b4\uc6a9\")\n\n# delete doc\ndc_api.remove_document(board_id=\"programming\", doc_id=doc_id, pw=\"1234\")\n\n# write comment\ncom_id = write_comment(board_id=\"programming\", doc_no=doc_no, \n name=\"\uc810\uc9c4\uc801\uc790\uc0b4\", pw=\"1234\", contents=\"\uc544\ub2d8\")\n \n'''(Under development)\n# delete comment\ndc_api.removeComment(board_id=\"programming\", is_miner=False, doc_no=doc_no, \n comment_no=comment_no, pw=\"1234\")\n\n# upvote\ndc_api.upvote(board_id=\"programming\", is_miner=False, doc_no=doc_no)\n\n# upvote many times(it needs openvpn)\ndc_api.upvote(board_id=\"programming\", is_miner=False, doc_no=doc_no, num=10)\n'''\n\n# login\n# if you skip the sess parameter, it will use the default session(and it affects all other API calls that use default session)\nsess = dc_api.gen_session()\ndc_api.login(id=\"\", pw=\"\", sess=sess)\n\n# write doc with logined session\n# if you have skiped sess parameter of login API, you should also skip following API's sess parameters\ndoc_id = dc_api.write_document(sess=sess, board_id=\"programming\", \n title=\"\uc81c\ubaa9\", contents=\"\ub0b4\uc6a9\")\n \n# modify doc with logined session\ndoc_id = dc_api.modify_document(sess=sess, board_id=\"programming\", doc_id=doc_id,\n title=\"\uc218\uc815\ub41c \uc81c\ubaa9\", contents=\"\uc218\uc815\ub41c \ub0b4\uc6a9\")\n\n# write comment with logined session\n# if you have skiped sess parameter of login API, you should also skip following API's sess parameters\n# write comment\ncom_id = write_comment(sess=sess, board_id=\"programming\", doc_id=doc_id, \n name=\"\uc810\uc9c4\uc801\uc790\uc0b4\", pw=\"1234\", contents=\"\uc544\ub2d8\")\n \n'''(Under development)\n# delete comment with logined session\ndc_api.removeComment(sess=sess, board_id=\"programming\", is_miner=False, \n doc_no=doc_no, comment_no=comment_no)\n \n# upvote with logined session\ndc_api.upvote(board_id=\"programming\", is_miner=False, doc_no=doc_no, sess=sess)\n\n# logout\ndc_api.logout(sess)\n'''\n\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/song9446/dcinside-python3-api", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dc-api", "package_url": "https://pypi.org/project/dc-api/", "platform": "", "project_url": "https://pypi.org/project/dc-api/", "project_urls": { "Homepage": "https://github.com/song9446/dcinside-python3-api" }, "release_url": "https://pypi.org/project/dc-api/0.4.6/", "requires_dist": null, "requires_python": "", "summary": "Deadly dimple unofficial dcinside api", "version": "0.4.6" }, "last_serial": 5137122, "releases": { "0.3.1": [ { "comment_text": "", "digests": { "md5": "4451622da1a464faa9e6d4f2c729905a", "sha256": "b4a61a40d53ec9b645c867511ba662d542386243b877c9ed35bd4e850c7c5509" }, "downloads": -1, "filename": "dc_api-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4451622da1a464faa9e6d4f2c729905a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11712, "upload_time": "2018-12-01T07:59:24", "url": "https://files.pythonhosted.org/packages/a3/d1/1be9eb37bed5c2ba4a1f306f4da219ed0f50a791fc631fa2dcdc22aab872/dc_api-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "feb0495e2d07d7af3ed3f9a920b7eed2", "sha256": "6015fd79e3a72b8257726c739bc5c3202b66680e7bea8d450bb5d4a4f8dd3a1c" }, "downloads": -1, "filename": "dc_api-0.3.1.tar.gz", "has_sig": false, "md5_digest": "feb0495e2d07d7af3ed3f9a920b7eed2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7438, "upload_time": "2018-12-01T07:59:28", "url": "https://files.pythonhosted.org/packages/a1/89/17da29ef382760cc0e42c194ecda72f1ed9e043077c158981055b43c214e/dc_api-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "5971be4557adc3ef4cf6e4d7e4e0fc33", "sha256": "9c95aac0f574f41765953b24458fbd1e47f393110420d39fe2fe32b0523f376b" }, "downloads": -1, "filename": "dc_api-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5971be4557adc3ef4cf6e4d7e4e0fc33", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11734, "upload_time": "2018-12-01T07:59:26", "url": "https://files.pythonhosted.org/packages/8a/05/08082ff4bdc156bb59c91eb2000eef968070e0e62c1ee8b63b3e63921a99/dc_api-0.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b27da46c66ac452ab5ca919af87e4f2c", "sha256": "180f90cad5b4f7d34e59ba701a9fb9339ce686a6be77b34f7c7c7bee089c7914" }, "downloads": -1, "filename": "dc_api-0.3.2.tar.gz", "has_sig": false, "md5_digest": "b27da46c66ac452ab5ca919af87e4f2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7492, "upload_time": "2018-12-01T07:59:30", "url": "https://files.pythonhosted.org/packages/e2/01/2448b8fd5b58d47bb7d1474798e14010de191b033f5b7f2bc1f243d03c67/dc_api-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "ed2ed96cf013f88e1ce5c7fe63326509", "sha256": "2019971b438be437be2e4ee15b10ea6aa3b25cfe02568b8010743c11acc87faf" }, "downloads": -1, "filename": "dc_api-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ed2ed96cf013f88e1ce5c7fe63326509", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11744, "upload_time": "2018-12-01T08:21:47", "url": "https://files.pythonhosted.org/packages/0c/72/2dfdf5bddb3aafedd515e0eaac63a4a5a2ffb76b364e10567f4fe70162aa/dc_api-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41dff557287ac7249671008d74249f50", "sha256": "973c1098be920ea7a436da7cf91410a3ea643a59d6e82df77bddc701aeb11dab" }, "downloads": -1, "filename": "dc_api-0.3.3.tar.gz", "has_sig": false, "md5_digest": "41dff557287ac7249671008d74249f50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7508, "upload_time": "2018-12-01T08:21:50", "url": "https://files.pythonhosted.org/packages/d2/7c/550d6948d95e8da4a91478246cbcc4f47f5dffff02e7348f84035e782a2f/dc_api-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "98aa700fccc051152c67960dd25f9577", "sha256": "21923d7146b9f2f616ce7a8b1c38e34693f2f77401bda0256f6a7c0196ba6072" }, "downloads": -1, "filename": "dc_api-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "98aa700fccc051152c67960dd25f9577", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11813, "upload_time": "2018-12-30T12:55:06", "url": "https://files.pythonhosted.org/packages/3c/ef/476288120557f3a2299d057069f2a1136b0e6bddcc35450fb6b9f6127bb6/dc_api-0.3.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "644b295e7dc0d46dd0205191db9da6f5", "sha256": "4876ccad7d66d86f87b3f51ef2437f79efc4f96cc6f85d5151ba8001aca5663f" }, "downloads": -1, "filename": "dc_api-0.3.4.tar.gz", "has_sig": false, "md5_digest": "644b295e7dc0d46dd0205191db9da6f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7575, "upload_time": "2018-12-30T12:55:11", "url": "https://files.pythonhosted.org/packages/2b/8c/f98462b0ce3173a26be6fa811a8ea597c943a81fa63638f729ed258ad6cc/dc_api-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "038891dad5c2a13710af9772903d8a4c", "sha256": "fc28c9b365d315eb45aac20cd0df93de9323c9f10e63d80b258018babdedffe7" }, "downloads": -1, "filename": "dc_api-0.3.5-py3-none-any.whl", "has_sig": false, "md5_digest": "038891dad5c2a13710af9772903d8a4c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7804, "upload_time": "2019-03-14T05:10:19", "url": "https://files.pythonhosted.org/packages/34/64/d555f86ddfec61943f31778acdd525e6f2562121bf4b3f66ca7d598ba6d2/dc_api-0.3.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "598d0dda68b84a47d62f4933a60d65e1", "sha256": "d75950f53472a00b299f93319030f0d0d4514c4be578291558ab21417ab76152" }, "downloads": -1, "filename": "dc_api-0.3.5.tar.gz", "has_sig": false, "md5_digest": "598d0dda68b84a47d62f4933a60d65e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7571, "upload_time": "2019-03-14T05:10:20", "url": "https://files.pythonhosted.org/packages/0f/0a/04372d59438b0cc0f167949da121a11967042f6b470da809c2677a75c3e1/dc_api-0.3.5.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "8a841a0130095163edc0ae76325a117d", "sha256": "4f62a222aeb5107f99fa1d5c72869f167e7b267987ce6ed8bd133f35b12f7db4" }, "downloads": -1, "filename": "dc_api-0.4.1.tar.gz", "has_sig": false, "md5_digest": "8a841a0130095163edc0ae76325a117d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6637, "upload_time": "2019-04-12T16:58:10", "url": "https://files.pythonhosted.org/packages/f3/67/ebf4fcf1f2caf0438e786c85288911049a276b714c83a4e8cfb4e9fe5b5f/dc_api-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "a6e265846be6a5675ac68ebe616fb6e7", "sha256": "0ec02a60992f24f294b70492ebdff53974eef85f84d40c1ff84cd1e75475e025" }, "downloads": -1, "filename": "dc_api-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a6e265846be6a5675ac68ebe616fb6e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7949, "upload_time": "2019-04-12T17:21:14", "url": "https://files.pythonhosted.org/packages/12/ff/fd913deb55f3687d93f2899651bd9be72aa052b44b3a2248e5b1e760a8aa/dc_api-0.4.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6beb4fc7438ee09d27826c2aabb4da5e", "sha256": "5290c4a747027389e36eea5b571b7f5169fe9b556eb81150c863970a35fcaedb" }, "downloads": -1, "filename": "dc_api-0.4.2.tar.gz", "has_sig": false, "md5_digest": "6beb4fc7438ee09d27826c2aabb4da5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7046, "upload_time": "2019-04-12T17:21:15", "url": "https://files.pythonhosted.org/packages/0a/30/c6dd231fbde1fe685bc7546c0492a239c8365a1a82f6822618bbbe061891/dc_api-0.4.2.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "bd501ac272d5fed572b6d3862674f6fd", "sha256": "e77660ee07447c5359ce666c70d38e61340254a12f94ce13d8a57a1e978f48fe" }, "downloads": -1, "filename": "dc_api-0.4.4-py3-none-any.whl", "has_sig": false, "md5_digest": "bd501ac272d5fed572b6d3862674f6fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7964, "upload_time": "2019-04-12T18:00:36", "url": "https://files.pythonhosted.org/packages/5e/f3/fc698d196836370998f71ae01cbc85c425f5eebeed297566029ddddc727a/dc_api-0.4.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e6bd31a65622d41b803a81eae12a120", "sha256": "fbac7164bf78cefad177fb32593b46177543e7f83077654ca623b7f62b2568cd" }, "downloads": -1, "filename": "dc_api-0.4.4.tar.gz", "has_sig": false, "md5_digest": "9e6bd31a65622d41b803a81eae12a120", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7103, "upload_time": "2019-04-12T18:00:37", "url": "https://files.pythonhosted.org/packages/14/b5/e02c4bd1569df138e099bab4b14bb1b2cccb13cf7f35ca9560e83cf47913/dc_api-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "c3d10df558059cbdae21b27f24a1a6a1", "sha256": "457eee0aecde333f7cc018abb7b393b405d7644ea4485dbdd908317926162d93" }, "downloads": -1, "filename": "dc_api-0.4.5.tar.gz", "has_sig": false, "md5_digest": "c3d10df558059cbdae21b27f24a1a6a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7603, "upload_time": "2019-04-13T07:20:12", "url": "https://files.pythonhosted.org/packages/7f/75/0abfa8da533e0eec87093ec7a94e84b6acdab992cd92c1c8406475a55117/dc_api-0.4.5.tar.gz" } ], "0.4.6": [ { "comment_text": "", "digests": { "md5": "756d090bf553b93a766f6e59abe3b545", "sha256": "c12da4444a0e0f92bd0342df21b3bb0cfe4c0c3affbf776b9cc53ad28166ed6c" }, "downloads": -1, "filename": "dc_api-0.4.6.tar.gz", "has_sig": false, "md5_digest": "756d090bf553b93a766f6e59abe3b545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7758, "upload_time": "2019-04-13T07:24:32", "url": "https://files.pythonhosted.org/packages/fb/97/99cbc5c89cc8b33454b7c76c80e5eb25ce85766a278996030d820646ee28/dc_api-0.4.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "756d090bf553b93a766f6e59abe3b545", "sha256": "c12da4444a0e0f92bd0342df21b3bb0cfe4c0c3affbf776b9cc53ad28166ed6c" }, "downloads": -1, "filename": "dc_api-0.4.6.tar.gz", "has_sig": false, "md5_digest": "756d090bf553b93a766f6e59abe3b545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7758, "upload_time": "2019-04-13T07:24:32", "url": "https://files.pythonhosted.org/packages/fb/97/99cbc5c89cc8b33454b7c76c80e5eb25ce85766a278996030d820646ee28/dc_api-0.4.6.tar.gz" } ] }