{ "info": { "author": "dgisolfi", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# RotatingProxyBot\nA Bot that uses a Rotating Proxy to simulate many clients making a request to a single server\n\n**Version 0.0.3**\n\n### Author\n\n**Daniel Gisolfi** - *All current work* - [dgisolfi](https://github.com/dgisolfi)\n\n## Usage\n\n```python\n#!/usr/bin/python3\nfrom RotatingProxyBot import ProxyBot\n\n# Create new custom bot\nbot = ProxyBot(\n address='IP OR URL',\n method='POST'\n desired_reqs=10,\n reqs_per_int=2,\n wait_time=60 # 1min\n)\n# Start Submiting and rotating proxies\nbot.enable()\n```\n\n## Building a list of Proxies\n\nThe bot will need a list of proxies to use for making requests, it can use either an API to retrieve proxies or a file to import them from.\n\n### Proxies from an API\n\nBy default, the bot will retrieve a few thousand proxies from an [API](https://www.proxy-list.download/). To use a custom API tell the bot what address to reach the API at by passing in the following argument when creating a new instance `proxy_api='http://api.com'`.\n\n### Proxies from a File\n\nTo use a custom file of proxies rather than the default API, pass in the following argument to the bot constructor `proxy_file=filename.txt`\nFor the bot to be able to import the list of proxies, the file should have the following structure:\n\n```txt\n0.0.0.0:80\n1.1.1.1:90\n2.2.2.2:20\n```\n\n## Methods\n\nThe following are some useful methods that are a part of the package\n\n### ProxyBot\n\n* **getRequest(proxy)** - if passed a specific proxy, this method will perform a`GET` request using the specified proxy to the address set in the creation of the bot. EX: `getRequest('0.0.0.0:80')`\n* **postRequest(proxy)** - if passed a specific proxy, this method will perform a `POST` request using the specified proxy to the address set in the creation of the bot. EX: `postRequest('0.0.0.0:80')`\n* **preformRotate()** - if called the bot will request a new proxy from the RotatingProxy class and perform the specified request to the specified address, returning the response element\n* **enable()** - if called will initiate the main loop of the bot, making the specified requests to the address using the set number of intervals and wait time\n* **disable()** - if called will shut down the main loop of the program and delete the bot\n\n### RotatingProxy\n\n* **buildProxyList()** - when called will contact the set API(or default one) to retrieve a list of up to date proxies in which it can pull from to make requests\n* **importProxyList()** - will attempt to build a list of proxies from the file name provided.\n* **rotate()** - will return the 0th proxy in the list and add it to the used proxy list.\n\n## Additional Arguments for the Constructor\n\nThe following are keyword arguments that can be passed into the constructor of the ProxyBot Class.\n\n* **id** - Assigns the instance of the ProxyBot with the given numeric ID\n\n Example: `RotatingProxyBot(id=1)`\n\n* **address** - the IP or URL for the bot to contact, will default to a tester API\n\n Example: `RotatingProxyBot(address='0.0.0.0')`\n\n* **method** - The request method to be used. Only `GET` and `POST` supported. The default is `GET`\n Example: `RotatingProxyBot(method='POST')`\n\n* **params** - Parameters to be passed with the request, works with all request methods \n Example: `RotatingProxyBot(params={'example':'test'})`\n\n* **desired_reqs** - Desired number of requests to be completed\n\n Example: `RotatingProxyBot(desired_reqs=10)`\n\n* **keep_alive** - A boolean allow the bot to continue to make requests forever\n\n *if set to `True` dont set `desired_reqs`*\n Example: `RotatingProxyBot(keep_alive=True)`\n\n* **reqs_per_int** - Requests Per Interval, number of requests to be completed before waiting. This will prevent the server from being DOSed\n Example: `RotatingProxyBot(reqs_per_int=2)`\n\n* **wait_time** - Amount of time in Seconds to wait until the next interval of requests\n Example: `RotatingProxyBot(wait_time=600)`", "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/dgisolfi/RotatingProxyBot", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "RotatingProxyBot", "package_url": "https://pypi.org/project/RotatingProxyBot/", "platform": "", "project_url": "https://pypi.org/project/RotatingProxyBot/", "project_urls": { "Homepage": "https://github.com/dgisolfi/RotatingProxyBot" }, "release_url": "https://pypi.org/project/RotatingProxyBot/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "A Bot that acts as a Rotating Proxy Crawler, simulating many clients to a single server", "version": "0.0.3" }, "last_serial": 4692515, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "dc99e47f807581a0189c65dc6caa6f8b", "sha256": "79c04db4714e3c81f36192afd9d20cf567460b39a72862a1bc4d9c4bc81fd44c" }, "downloads": -1, "filename": "RotatingProxyBot-0.0.2.tar.gz", "has_sig": false, "md5_digest": "dc99e47f807581a0189c65dc6caa6f8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2779, "upload_time": "2019-01-09T16:44:20", "url": "https://files.pythonhosted.org/packages/64/7a/26235edc65c06dbc079aec523c1e6e7bf3b6ef6b1db90a87843c304daca8/RotatingProxyBot-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "500c7a725050d24498e8552ba925bbe8", "sha256": "361b0b9e2652336b10acd85d24b6ba97b999b76b3ee186caf8aceafff26011ff" }, "downloads": -1, "filename": "RotatingProxyBot-0.0.3.tar.gz", "has_sig": false, "md5_digest": "500c7a725050d24498e8552ba925bbe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5112, "upload_time": "2019-01-14T03:06:14", "url": "https://files.pythonhosted.org/packages/18/c3/dc03074a03a8c641850d6388adde94a6feed192dbaa67885ef1b5d6b81bf/RotatingProxyBot-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "500c7a725050d24498e8552ba925bbe8", "sha256": "361b0b9e2652336b10acd85d24b6ba97b999b76b3ee186caf8aceafff26011ff" }, "downloads": -1, "filename": "RotatingProxyBot-0.0.3.tar.gz", "has_sig": false, "md5_digest": "500c7a725050d24498e8552ba925bbe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5112, "upload_time": "2019-01-14T03:06:14", "url": "https://files.pythonhosted.org/packages/18/c3/dc03074a03a8c641850d6388adde94a6feed192dbaa67885ef1b5d6b81bf/RotatingProxyBot-0.0.3.tar.gz" } ] }