{ "info": { "author": "LImoritakeU", "author_email": "LImoritakeU@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Ptt2Json\n\nA simple python library to extract pages and posts information from https://www.ptt.cc/bbs/ to json format\n\n```python\n>>> from ptt2json import *\n>>> ptt = PttPage(boardname=\"Gossiping\")\n>>> print(ptt.posts)\n\n[{'url': '/bbs/Gossiping/M.1560591164.A.B9C.html',\n 'post_id': 'M.1560591164.A.B9C',\n 'timestamp': '1560591164',\n 'title': '[\u65b0\u805e] \u66b4\u52d5\uff01\u8ca1\u7d93\u5973\u795e\u8a2a\u6b50\u66ec\u65e5\u5149\u6d74 \u767d\u7699\u9577\u817f\u60f9',\n 'nrec': '',\n 'author': 'cycling',\n 'mark': ''},\n {'url': '/bbs/Gossiping/M.1560591174.A.B05.html',\n 'post_id': 'M.1560591174.A.B05',\n 'timestamp': '1560591174',\n 'title': '[\u65b0\u805e] \u97d3\u570b\u745c\u9020\u52e2\u5230\u5e95\u591a\u5c11\u4eba? \u6905\u5b50\u7cbe\u7b97\u5e2b\u56db\u53c9\u8c93\u7b97\u7d66\u4f60',\n 'nrec': '',\n 'author': 'sweat992001',\n 'mark': ''},\n {'url': '/bbs/Gossiping/M.1560591182.A.50D.html',\n 'post_id': 'M.1560591182.A.50D',\n 'timestamp': '1560591182',\n 'title': 'Re: [\u65b0\u805e] \u5927\u70cf\u9f8d\uff01\u651d\u5f71\u5e2b\u783830\u842c\u4feeMacBook \u6700\u5f8c\u767c\u73fe',\n 'nrec': '',\n 'author': 'YHOTV4096',\n 'mark': ''},\n ...]\n```\n\n## PttPage\n\n```\n[\n\t{\n\t\t\"url\": str,\n\t\t\"post_id\": str,\n\t\t\"timestamp\": str, # unix time\n\t\t\"title\": str, \n\t\t\"nrec\": str, # \u63a8\u5653\u6587\u76f8\u52a0\u7e3d\u548c\n\t\t\"author\": str,\n\t\t\"mark\": # \u6a19\u8a18\n\t},\n\t...\n]\n```\n\n## PttPost\n\n```\n{\n\t\"article_id\": str,\n \"article_title\": str,\n \"author\": str,\n \"board\": str,\n \"content\": str,\n \"timestamp\": int,\n \"ip\": str, # ipv4 address \n \"ip_country\": str, # ip <-> country mapping\n \"message_count\": {\n \"all\": str, # \u63a8\u3001\u5653\u3001\u7bad\u982d\u7e3d\u6578\n \"boo\": str, # \u5653\u6587\n \"count\": str, # \u63a8 - \u5653\u6587\n \"neutral\": str, # \u7bad\u982d\n \"push\": str, # \u63a8\u6587\n },\n \"messages\": [\n \t{\n \t\t\"push_tag\": str, # \u8a55\u8ad6\u7b26\u865f\n \t\t\"push_userid\": str,\n \t\t\"push_content\": str,\n \t\t\"push_ipdatetime # ip \u8207\u6642\u9593\uff08\u7121\u65e5\u671f\uff09\n \t}\n ],\n \"url\": str,\n \"is_404\": \u662f\u5426\u522a\u6587,\n}\n\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/LImoritakeU/ptt2json", "keywords": "ptt", "license": "", "maintainer": "LImoritakeU", "maintainer_email": "LImoritakeU@gmail.com", "name": "ptt2json", "package_url": "https://pypi.org/project/ptt2json/", "platform": "", "project_url": "https://pypi.org/project/ptt2json/", "project_urls": { "Homepage": "https://github.com/LImoritakeU/ptt2json" }, "release_url": "https://pypi.org/project/ptt2json/0.1.1/", "requires_dist": [ "requests (>=2.22,<3.0)", "pyquery (>=1.4,<2.0)" ], "requires_python": ">=3.6,<4.0", "summary": "A simple python library to extract pages and posts information from https://www.ptt.cc/bbs/ to json format", "version": "0.1.1" }, "last_serial": 5411042, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5a7555608f2caffe081238ef6d94f4fb", "sha256": "de2c848524c1b0c27349a9fa2d52d2fd0f0383a1b8aef943a32de5a1a3f533ef" }, "downloads": -1, "filename": "ptt2json-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a7555608f2caffe081238ef6d94f4fb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 3732, "upload_time": "2019-06-15T16:11:49", "url": "https://files.pythonhosted.org/packages/15/c7/8421420ca63c13191753f730056e663a1ce707b36ba6ff7a09b633287111/ptt2json-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00b0b93eabf9a360bbba1aa123beff22", "sha256": "7a4771206827f376045fc17f122519393062fe795f3d444fe3e1f592d73e026c" }, "downloads": -1, "filename": "ptt2json-0.1.0.tar.gz", "has_sig": false, "md5_digest": "00b0b93eabf9a360bbba1aa123beff22", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 3803, "upload_time": "2019-06-15T16:11:51", "url": "https://files.pythonhosted.org/packages/ee/a9/d0ca23194d808677c182ca741994aecf165f863cc99af97c506c2f4764ed/ptt2json-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "085ff09cade37587943f405f1e85141b", "sha256": "4108b6af536f8cd5206189441c534f40f496034d891012f64c1fd0a3e2edd26a" }, "downloads": -1, "filename": "ptt2json-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "085ff09cade37587943f405f1e85141b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4116, "upload_time": "2019-06-17T17:18:50", "url": "https://files.pythonhosted.org/packages/b1/e2/0d8d4e13397db8e04fb9c60d9a8b35d086c12b6deba740c00a1b74afd2d6/ptt2json-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "25d44f4782f25916dbf736922c7963fc", "sha256": "bd6d4c856fbc71b103122134650f1962cf6a1dea22360f5e8e9f30cec53e51a4" }, "downloads": -1, "filename": "ptt2json-0.1.1.tar.gz", "has_sig": false, "md5_digest": "25d44f4782f25916dbf736922c7963fc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4341, "upload_time": "2019-06-17T17:18:52", "url": "https://files.pythonhosted.org/packages/52/9c/f2061efa8b24b8c27f2a6edf97989a2c684bc20b386ec7f35acef6347aca/ptt2json-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "085ff09cade37587943f405f1e85141b", "sha256": "4108b6af536f8cd5206189441c534f40f496034d891012f64c1fd0a3e2edd26a" }, "downloads": -1, "filename": "ptt2json-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "085ff09cade37587943f405f1e85141b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4116, "upload_time": "2019-06-17T17:18:50", "url": "https://files.pythonhosted.org/packages/b1/e2/0d8d4e13397db8e04fb9c60d9a8b35d086c12b6deba740c00a1b74afd2d6/ptt2json-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "25d44f4782f25916dbf736922c7963fc", "sha256": "bd6d4c856fbc71b103122134650f1962cf6a1dea22360f5e8e9f30cec53e51a4" }, "downloads": -1, "filename": "ptt2json-0.1.1.tar.gz", "has_sig": false, "md5_digest": "25d44f4782f25916dbf736922c7963fc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4341, "upload_time": "2019-06-17T17:18:52", "url": "https://files.pythonhosted.org/packages/52/9c/f2061efa8b24b8c27f2a6edf97989a2c684bc20b386ec7f35acef6347aca/ptt2json-0.1.1.tar.gz" } ] }