{ "info": { "author": "fate0", "author_email": "fate0@fatezero.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "# getproxy\n\n[![Build Status](https://travis-ci.org/fate0/getproxy.svg?branch=master)](https://travis-ci.org/fate0/getproxy)\n[![Updates](https://pyup.io/repos/github/fate0/getproxy/shield.svg)](https://pyup.io/repos/github/fate0/getproxy/)\n[![PyPI](https://img.shields.io/pypi/v/getproxy.svg)](https://pypi.python.org/pypi/getproxy)\n[![PyPI](https://img.shields.io/pypi/pyversions/getproxy.svg)](https://pypi.python.org/pypi/getproxy)\n\ngetproxy \u662f\u4e00\u4e2a\u6293\u53d6\u53d1\u653e\u4ee3\u7406\u7f51\u7ad9\uff0c\u83b7\u53d6 http/https \u4ee3\u7406\u7684\u7a0b\u5e8f\uff0c\n\u6bcf 15 min \u4f1a\u66f4\u65b0\u6570\u636e\u81f3 [fate0/proxylist](https://github.com/fate0/proxylist)\n\n\n## 1. \u5b89\u88c5\n\n```\npip install -U getproxy\n```\n\n## 2. \u4f7f\u7528\n\n### \u5e2e\u52a9\u4fe1\u606f\n```\n\u279c ~ getproxy --help\nUsage: getproxy [OPTIONS]\n\nOptions:\n --in-proxy TEXT Input proxy file\n --out-proxy TEXT Output proxy file\n --help Show this message and exit.\n```\n\n* `--in-proxy` \u53ef\u9009\u53c2\u6570\uff0c\u5f85\u9a8c\u8bc1\u7684 proxies \u5217\u8868\u6587\u4ef6\n* `--out-proxy` \u53ef\u9009\u53c2\u6570\uff0c\u8f93\u51fa\u5df2\u9a8c\u8bc1\u7684 proxies \u5217\u8868\u6587\u4ef6\uff0c\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u76f4\u63a5\u8f93\u51fa\u5230\u7ec8\u7aef\n\n`--in-proxy` \u6587\u4ef6\u683c\u5f0f\u548c `--out-proxy` \u6587\u4ef6\u683c\u5f0f\u4e00\u81f4\n\n### \u4f7f\u7528\u4f8b\u5b50\n\n```\n(test2.7) \u279c ~ getproxy\nINFO:getproxy.getproxy:[*] Init\nINFO:getproxy.getproxy:[*] Current Ip Address: 1.1.1.1\nINFO:getproxy.getproxy:[*] Load input proxies\nINFO:getproxy.getproxy:[*] Validate input proxies\nINFO:getproxy.getproxy:[*] Load plugins\nINFO:getproxy.getproxy:[*] Grab proxies\nINFO:getproxy.getproxy:[*] Validate web proxies\nINFO:getproxy.getproxy:[*] Check 6666 proxies, Got 666 valid proxies\n\n...\n```\n\n\n## 3. \u8f93\u5165/\u8fd4\u56de\u683c\u5f0f\n\n\u6bcf\u4e00\u884c\u7ed3\u679c\u90fd\u662f\u4e00\u4e2a json \u5b57\u7b26\u4e32\uff0c\u683c\u5f0f\u5982\u4e0b:\n```json\n{\n \"type\": \"http\",\n \"host\": \"1.1.1.1\",\n \"port\": 8080,\n \"anonymity\": \"transparent\",\n \"country\": \"CN\",\n \"response_time\": 3.14,\n \"from\": \"txt\"\n}\n```\n\n| \u5c5e\u6027 \u00a0 | \u7c7b\u578b \u00a0 | \u63cf\u8ff0 \u00a0 | \u53ef\u9009\u503c \u00a0 |\n|------- |--------|-------- |----------|\n| type | str \u00a0 | proxy \u7c7b\u578b | `http`, `https`|\n| host \u00a0 \u00a0 \u00a0 \u00a0 | str \u00a0 | proxy \u5730\u5740 | |\n| port \u00a0 \u00a0 \u00a0 \u00a0 | int \u00a0 | \u7aef\u53e3 | |\n| anonymity \u00a0 \u00a0 | str \u00a0 | \u533f\u540d\u6027 | `transparent`, `anonymous`, `high_anonymous` |\n| country | str | proxy \u56fd\u5bb6 | |\n| response_time | float | \u54cd\u5e94\u65f6\u95f4 | |\n| from \u00a0 \u00a0 \u00a0 \u00a0 | str \u00a0 | \u6765\u6e90 | |\n\n\n## 4. Plugin \u76f8\u5173\n\n### Plugin \u4ee3\u7801\u683c\u5f0f\n\n``` python\n\nclass Proxy(object):\n def __init__(self):\n self.result = []\n self.proxies = []\n\n def start(self):\n pass\n```\n\n### Plugin \u8fd4\u56de\u7ed3\u679c\n\n```\n{\n \"host\": \"1.1.1.1\",\n \"port\": 8080,\n \"from\": \"plugin name\"\n}\n```\n\n### Plugin \u5c0f\u63d0\u793a\n\n* \u4e0d\u8981\u5728 plugin \u5185\u4f7f\u7528\u591a\u7ebf\u7a0b\u3001gevent \u7b49\u65b9\u6cd5\n* \u5982\u679c\u76ee\u6807\u7f51\u7ad9\u5b58\u5728\u5206\u9875\uff0c\u8bf7\u5728\u83b7\u53d6\u6bcf\u9875\u5185\u5bb9\u4e4b\u540e\uff0c\u81ea\u884c\u6dfb\u52a0 delay\n* \u5982\u679c\u76ee\u6807\u7f51\u7ad9\u5b58\u5728\u5206\u9875\uff0c\u8bf7\u5728\u83b7\u53d6\u6bcf\u9875\u7ed3\u679c\u4e4b\u540e\uff0c\u53ca\u65f6\u653e\u5165 `self.result` \u4e2d\n* \u5982\u679c\u88ab\u76ee\u6807\u7f51\u7ad9 ban \u4e86\uff0c\u53ef\u4ee5\u5229\u7528\u5df2\u7ecf\u9a8c\u8bc1\u7684 proxies (\u4e5f\u5c31\u662f `self.proxies`)\n\n## 5. \u7b2c\u4e09\u65b9\u7a0b\u5e8f\u8c03\u7528\n\n\u76f4\u63a5\u8fd0\u884c `getproxy` \u7b49\u540c\u4e8e\u6267\u884c\u4e0b\u9762\u7a0b\u5e8f:\n\n``` python\n#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom getproxy import GetProxy\n\ng = GetProxy()\n\n# 1. \u521d\u59cb\u5316\uff0c\u5fc5\u987b\u6b65\u9aa4\ng.init()\n\n# 2. \u52a0\u8f7d input proxies \u5217\u8868\ng.load_input_proxies()\n\n# 3. \u9a8c\u8bc1 input proxies \u5217\u8868\ng.validate_input_proxies()\n\n# 4. \u52a0\u8f7d plugin\ng.load_plugins()\n\n# 5. \u6293\u53d6 web proxies \u5217\u8868\ng.grab_web_proxies()\n\n# 6. \u9a8c\u8bc1 web proxies \u5217\u8868\ng.validate_web_proxies()\n\n# 7. \u4fdd\u5b58\u5f53\u524d\u6240\u6709\u5df2\u9a8c\u8bc1\u7684 proxies \u5217\u8868\ng.save_proxies()\n\n```\n\n\u5982\u679c\u53ea\u60f3\u9a8c\u8bc1 proxies \u5217\u8868\uff0c\u5e76\u4e0d\u9700\u8981\u6293\u53d6\u522b\u4eba\u7684 proxies\uff0c\u5219\u53ef\u4ee5:\n\n``` python\ng.init()\ng.load_input_proxies()\ng.validate_input_proxies()\n\nprint(g.valid_proxies)\n```\n\n\u5982\u679c\u5f53\u524d\u7a0b\u5e8f\u4e0d\u9700\u8981\u8f93\u51fa proxies \u5217\u8868\uff0c\u800c\u662f\u5728\u7a0b\u5e8f\u4e2d\u76f4\u63a5\u4f7f\u7528\uff0c\u5219\u53ef\u4ee5:\n\n``` python\ng.init()\ng.load_plugins()\ng.grab_web_proxies()\ng.validate_web_proxies()\n\nprint(g.valid_proxies)\n```\n\n## 6. Q & A\n\n* \u4e3a\u4ec0\u4e48\u4e0d\u4f7f\u7528 xxx \u6570\u636e\u5e93\uff1f\n\n\u6570\u636e\u91cf\u5e76\u4e0d\u5927\uff0c\u5c31\u7b97\u7528\u6587\u672c\u683c\u5f0f\u5168\u8bfb\u8fdb\u5185\u5b58\uff0c\u4e5f\u5360\u7528\u4e0d\u4e86\u591a\u5c11\u5185\u5b58\uff0c\u5c31\u7b97\u771f\u7684\u9700\u8981\u5b58\u50a8\u81f3\u6570\u636e\u5e93\uff0c\u81ea\u5df1\u518d\u591a\u5199\u51e0\u884c\u4ee3\u7801\u5c31\u641e\u5b9a\u3002\n\u53e6\u5916\u4f7f\u7528\u6587\u672c\u683c\u5f0f\u8fd8\u6709\u53e6\u5916\u4e00\u4e2a\u597d\u5904\u662f\u53ef\u4ee5\u521b\u5efa\u8fd9\u4e2a\u9879\u76ee [fate0/proxylist](https://github.com/fate0/proxylist)\n\n* \u548c xxx \u6709\u4ec0\u4e48\u533a\u522b?\n\n\u7b80\u5355\u3001\u65b9\u4fbf\u3001\u5feb\u6377\uff0c\u9664\u4e86 Python \u73af\u5883\uff0c\u5176\u4ed6\u90fd\u4e0d\u7528\u8bbe\u7f6e\u3002\n\n* \u62a5\u9519\u5566\uff0c\u600e\u4e48\u529e?\n\n\u4ed4\u7ec6\u770b\u770b\u9519\u8bef\u4fe1\u606f\uff0c\u662f\u4e0d\u662f\u4e00\u4e9b plugin \u62a5\u9519\u8bef\uff0c\u800c\u4e14\u9519\u8bef\u90fd\u662f\u548c\u7f51\u7edc\u76f8\u5173\u7684\uff1f\n\u5982\u679c\u662f\u7684\u8bdd\uff0c\u53ef\u80fd\u8fd9\u4e9b plugin \u8bbf\u95ee\u7684\u7f51\u7ad9\u7531\u4e8e\u4f17\u6240\u5468\u77e5\u7684\u539f\u56e0\u88ab block \u4e86\u3002\n\u5982\u679c\u4e0d\u662f\uff0c\u8d76\u7d27\u63d0 Issue\u3002\n\n* \u8fd8\u7ee7\u7eed\u6dfb\u52a0\u65b0\u7684 plugin \u5417\uff1f\n\n\u4e3b\u8981\u770b\u8fd9\u4e2a\u9879\u76ee [fate0/proxylist](https://github.com/fate0/proxylist) \u4e2d\u7684 `proxy.list` \u6570\u91cf\uff0c\n\u5982\u679c `proxy.list` \u884c\u6570\u63a5\u8fd1 5000 \u4e2a\uff0c\u90a3\u5c31\u4e0d\u518d\u7ee7\u7eed\u6dfb\u52a0\u65b0\u7684 plugin\uff0c\u9632\u6b62 travis 15min \u5185\u4e0d\u7ed3\u675f\u3002\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fate0/getproxy", "keywords": "getproxy", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "getproxy", "package_url": "https://pypi.org/project/getproxy/", "platform": "", "project_url": "https://pypi.org/project/getproxy/", "project_urls": { "Homepage": "https://github.com/fate0/getproxy" }, "release_url": "https://pypi.org/project/getproxy/0.2.3/", "requires_dist": [ "click (>=6.0)", "geoip2 (>=2.5.0)", "gevent (>=1.2.1)", "requests (>=2.13.0)", "retrying (>=1.3.3)" ], "requires_python": "", "summary": "get proxy", "version": "0.2.3" }, "last_serial": 3033932, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "806933d4661654ac8bbfaa02551a8b0e", "sha256": "8246858423bbe1c85471532b5b16770fcfd514b088d2784f87ad02cf20d5953b" }, "downloads": -1, "filename": "getproxy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "806933d4661654ac8bbfaa02551a8b0e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1434083, "upload_time": "2017-06-19T18:27:50", "url": "https://files.pythonhosted.org/packages/b0/3c/feb45db4769a440418ae207f3e54e458bda448c73963bde9d6d76820c541/getproxy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f110bdeeeb29aaef9da3e40c27476dfc", "sha256": "01ce246cf26c9383affb6289fba8424c740bade0e097dbaf011bb92919bf5f77" }, "downloads": -1, "filename": "getproxy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f110bdeeeb29aaef9da3e40c27476dfc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11637, "upload_time": "2017-05-21T11:06:22", "url": "https://files.pythonhosted.org/packages/83/d8/ec41860eb87eef77129bab0a765b1aa27cd15955e99c6b582d3cab295791/getproxy-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5bad73c0679375de4b59d625d4b2d0f4", "sha256": "1acba761036b1cda6e6c9344e0a0d6e7c660f576232c2e2dad41e92f1a891a89" }, "downloads": -1, "filename": "getproxy-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5bad73c0679375de4b59d625d4b2d0f4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1434078, "upload_time": "2017-06-19T18:35:18", "url": "https://files.pythonhosted.org/packages/9c/a9/7b55abb62458f9fe2cae8370719b89a89f803b12574ec1459a422bb837df/getproxy-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdf3f8063daeddf8ff34de8cb1eaaf3c", "sha256": "2edebe960b3df659011954d960dfc2dcfdc97764b4826f5c653a29b35383ba7a" }, "downloads": -1, "filename": "getproxy-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fdf3f8063daeddf8ff34de8cb1eaaf3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1418249, "upload_time": "2017-06-19T18:35:21", "url": "https://files.pythonhosted.org/packages/b4/cd/20cf991f81d1a0fa824574f4622c606db41ee9eff818ea05fa1790ad6dbf/getproxy-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a8867297ad3f1272c9a648dd7ed25239", "sha256": "a5294295980aa349347e8f0591831a9a7e415cf2472cdfc77a1af2a8517b63be" }, "downloads": -1, "filename": "getproxy-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a8867297ad3f1272c9a648dd7ed25239", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1434885, "upload_time": "2017-06-22T13:06:20", "url": "https://files.pythonhosted.org/packages/2b/5f/9a095691e7cabf04a9f59ddeffd9c7532adee12bb10a23183338866a9176/getproxy-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "13d5063650dbf6f36785e4e93d49e636", "sha256": "ec3b5ea23d77975e6d56ed7c7009e135c3716d4f6fc4a68111c7a64e5d9dfeb0" }, "downloads": -1, "filename": "getproxy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "13d5063650dbf6f36785e4e93d49e636", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1418759, "upload_time": "2017-06-22T13:06:23", "url": "https://files.pythonhosted.org/packages/d3/be/d80b8fe93e8358ce5fa7e089985387ecc2a40a44784e43c00ac29f012349/getproxy-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "49ef5de240a2a02551e7c3055ae190c4", "sha256": "f928f244e00b91096e8218d60374469244a79361702939ed420aac9938a81c75" }, "downloads": -1, "filename": "getproxy-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "49ef5de240a2a02551e7c3055ae190c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1434895, "upload_time": "2017-06-30T16:34:55", "url": "https://files.pythonhosted.org/packages/24/c7/614c8ec497ee5b725310f00ffecbbd5aee6acffbbe97aa990f805fdc7905/getproxy-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4023ac31f8857074c36123ea42f6abd", "sha256": "3949396ee7be7008678d37ab21d7d78b2fbe6dcc3c64616f799b19784a1d0377" }, "downloads": -1, "filename": "getproxy-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d4023ac31f8857074c36123ea42f6abd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1418777, "upload_time": "2017-06-30T16:34:58", "url": "https://files.pythonhosted.org/packages/ef/80/bfe1746cefdd18ef8af3310de0e04ea6f7a7c2d76da5f8b81537f72e3ba0/getproxy-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "997d57b68bcde4b6c3b2e52fac935837", "sha256": "e6e9ddc22819ecee1602ce36c7a3fd42b9be0c4940c795e1ef000e25b55228f4" }, "downloads": -1, "filename": "getproxy-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "997d57b68bcde4b6c3b2e52fac935837", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1434958, "upload_time": "2017-07-19T12:25:52", "url": "https://files.pythonhosted.org/packages/bc/24/2aa27483d9e979e5f0b23804d60a6ce9e630424af0431396fcf11edf72a7/getproxy-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaa68f475ef980be5a0504a977b71fb2", "sha256": "552e6b4db37abe97914ef9eb0b88b50f6714054d72ddb4df191f284baeb05ae5" }, "downloads": -1, "filename": "getproxy-0.2.3.tar.gz", "has_sig": false, "md5_digest": "aaa68f475ef980be5a0504a977b71fb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1418852, "upload_time": "2017-07-19T12:25:55", "url": "https://files.pythonhosted.org/packages/ea/99/39d8a796023b9a81754841c23e3e7dfbf6192be2002226d78cee5dd736ca/getproxy-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "997d57b68bcde4b6c3b2e52fac935837", "sha256": "e6e9ddc22819ecee1602ce36c7a3fd42b9be0c4940c795e1ef000e25b55228f4" }, "downloads": -1, "filename": "getproxy-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "997d57b68bcde4b6c3b2e52fac935837", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1434958, "upload_time": "2017-07-19T12:25:52", "url": "https://files.pythonhosted.org/packages/bc/24/2aa27483d9e979e5f0b23804d60a6ce9e630424af0431396fcf11edf72a7/getproxy-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaa68f475ef980be5a0504a977b71fb2", "sha256": "552e6b4db37abe97914ef9eb0b88b50f6714054d72ddb4df191f284baeb05ae5" }, "downloads": -1, "filename": "getproxy-0.2.3.tar.gz", "has_sig": false, "md5_digest": "aaa68f475ef980be5a0504a977b71fb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1418852, "upload_time": "2017-07-19T12:25:55", "url": "https://files.pythonhosted.org/packages/ea/99/39d8a796023b9a81754841c23e3e7dfbf6192be2002226d78cee5dd736ca/getproxy-0.2.3.tar.gz" } ] }