Name | proxy-spinner JSON |
Version |
0.4
JSON |
| download |
home_page | https://github.com/Eric-Canas/proxy-spinner |
Summary | ProxySpinner is an straightforward, non-reliable, non-secure, but easy-to-use library for avoiding IP blocking by rotating free proxies on demand. It relies in services like proxyscrape.com to get the proxies and rotates them on demand, and is subject to the availability of that service and the proxies it lists. |
upload_time | 2024-08-22 07:45:17 |
maintainer | None |
docs_url | None |
author | Eric-Canas |
requires_python | >=3.6 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
requests
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Proxy Spinner
ProxyRotator is an straightforward, *non-reliable*, *non-secure*, but easy-to-use library for avoiding IP blocking
by rotating free proxies on demand. It relies in services like [ProxyScrape.com](https://proxyscrape.com/free-proxy-list) to get the proxies and
rotate them on demand, and is subject to the availability of that service and the proxies it lists.
## Installation
```bash
pip install proxy-spinner
```
## Usage
```python
from proxy_spinner import ProxySpinner
import requests
# Initialize the proxy rotator. By default it uses no proxy until you call renew_proxy
proxy_manager = ProxySpinner()
# Renew the proxy to use a new one. Could take a while to find a working one
found_proxy = proxy_manager.renew_proxy()
# Use the proxy in your requests within a context manager
with proxy_manager:
response = requests.get("https://cmp.inmobi.com/geoip").json()
print(f"PROXY ENABLED: You are at {response['city']} ({response['country']}) "
"[Proxy: {found_proxy}]")
# Without the context manager, the proxy is not used
response = requests.get("https://cmp.inmobi.com/geoip").json()
print(f"PROXY DISABLED: You are at {response['city']} ({response['country']})")
```
Output:
```
PROXY ENABLED: You are at budapest (hun) [Proxy: 178.48.68.61:18080]
PROXY DISABLED: You are at ********** (esp)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Eric-Canas/proxy-spinner",
"name": "proxy-spinner",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Eric-Canas",
"author_email": "eric@ericcanas.com",
"download_url": "https://files.pythonhosted.org/packages/97/41/43cab413d11869515459f5cdd05880694a38d6021781555b8b6bb08fddf1/proxy-spinner-0.4.tar.gz",
"platform": null,
"description": "# Proxy Spinner\n\nProxyRotator is an straightforward, *non-reliable*, *non-secure*, but easy-to-use library for avoiding IP blocking \nby rotating free proxies on demand. It relies in services like [ProxyScrape.com](https://proxyscrape.com/free-proxy-list) to get the proxies and \nrotate them on demand, and is subject to the availability of that service and the proxies it lists.\n\n## Installation\n\n```bash\npip install proxy-spinner\n```\n\n## Usage\n\n```python\nfrom proxy_spinner import ProxySpinner\nimport requests\n\n# Initialize the proxy rotator. By default it uses no proxy until you call renew_proxy\nproxy_manager = ProxySpinner()\n# Renew the proxy to use a new one. Could take a while to find a working one\nfound_proxy = proxy_manager.renew_proxy()\n\n# Use the proxy in your requests within a context manager\nwith proxy_manager:\n response = requests.get(\"https://cmp.inmobi.com/geoip\").json()\n print(f\"PROXY ENABLED: You are at {response['city']} ({response['country']}) \"\n \"[Proxy: {found_proxy}]\")\n\n# Without the context manager, the proxy is not used\nresponse = requests.get(\"https://cmp.inmobi.com/geoip\").json()\nprint(f\"PROXY DISABLED: You are at {response['city']} ({response['country']})\")\n```\n\nOutput: \n```\nPROXY ENABLED: You are at budapest (hun) [Proxy: 178.48.68.61:18080]\nPROXY DISABLED: You are at ********** (esp)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "ProxySpinner is an straightforward, non-reliable, non-secure, but easy-to-use library for avoiding IP blocking by rotating free proxies on demand. It relies in services like proxyscrape.com to get the proxies and rotates them on demand, and is subject to the availability of that service and the proxies it lists.",
"version": "0.4",
"project_urls": {
"Homepage": "https://github.com/Eric-Canas/proxy-spinner"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f0bcf1b4200ed9ac990bc6a9009bcde3bd592e83aa9156d85b8664c54fa03e5e",
"md5": "6c5014c59cb5294c7306ea1de48df360",
"sha256": "fbf5b897ce58ac06e64eb94a680bfc39f1c9814493694bec3c6b8c0dd9c38fa8"
},
"downloads": -1,
"filename": "proxy_spinner-0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c5014c59cb5294c7306ea1de48df360",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4536,
"upload_time": "2024-08-22T07:45:16",
"upload_time_iso_8601": "2024-08-22T07:45:16.121305Z",
"url": "https://files.pythonhosted.org/packages/f0/bc/f1b4200ed9ac990bc6a9009bcde3bd592e83aa9156d85b8664c54fa03e5e/proxy_spinner-0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "974143cab413d11869515459f5cdd05880694a38d6021781555b8b6bb08fddf1",
"md5": "805c43127bf431a5178db2af2d5154ac",
"sha256": "a91620cd704ce32a9c0c5ab70bf35e18a83869aa126a3e1f68d358adb9e4a3f6"
},
"downloads": -1,
"filename": "proxy-spinner-0.4.tar.gz",
"has_sig": false,
"md5_digest": "805c43127bf431a5178db2af2d5154ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4028,
"upload_time": "2024-08-22T07:45:17",
"upload_time_iso_8601": "2024-08-22T07:45:17.055237Z",
"url": "https://files.pythonhosted.org/packages/97/41/43cab413d11869515459f5cdd05880694a38d6021781555b8b6bb08fddf1/proxy-spinner-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 07:45:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Eric-Canas",
"github_project": "proxy-spinner",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": []
}
],
"lcname": "proxy-spinner"
}