All Projects → rootVIII → Proxy_requests

rootVIII / Proxy_requests

Licence: mit
a class that uses scraped proxies to make http GET/POST requests (Python requests)

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Proxy requests

Mubeng
An incredibly fast proxy checker & IP rotator with ease.
Stars: ✭ 234 (-34.45%)
Mutual labels:  proxy, http-proxy, proxy-server, proxy-list
Proxybroker
Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS 🎭
Stars: ✭ 2,767 (+675.07%)
Mutual labels:  proxy, http-proxy, proxy-server, proxy-list
Free Proxy List
🔥Free proxy servers list / Updated hourly!
Stars: ✭ 326 (-8.68%)
Mutual labels:  proxy, http-proxy, proxy-server, proxy-list
Delete
(迫于压力,本项目停止维护,请尽快fork代码。1月1日之后删除项目)[免翻墙工具]A free and open-source youtube video proxy script [Written in PHP]
Stars: ✭ 1,316 (+268.63%)
Mutual labels:  proxy, proxy-server, proxy-list
Citadelcore
Cross platform filtering HTTP/S proxy based on .NET Standard 2.0.
Stars: ✭ 28 (-92.16%)
Mutual labels:  proxy, http-proxy, proxy-server
Noginx
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 53 (-85.15%)
Mutual labels:  proxy, http-proxy, proxy-server
Httpproxy
Go HTTP proxy server library
Stars: ✭ 110 (-69.19%)
Mutual labels:  proxy, http-proxy, proxy-server
Php Curl Class
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs
Stars: ✭ 2,903 (+713.17%)
Mutual labels:  proxy, requests, http-proxy
Freeproxy
免费、高速的 V2Ray 代理和订阅。
Stars: ✭ 104 (-70.87%)
Mutual labels:  proxy, proxy-server, proxy-list
Flynet
A powerful TCP/UDP tool, which support socks5 proxy by tcp and udp, http proxy and NAT traversal. This tool can help you bypass gfw easily
Stars: ✭ 124 (-65.27%)
Mutual labels:  proxy, http-proxy, proxy-server
Smartproxy
HTTP(S) Rotating Residential proxies - Code examples & General information
Stars: ✭ 205 (-42.58%)
Mutual labels:  proxy, http-proxy, proxy-server
Awslambdaproxy
An AWS Lambda powered HTTP/SOCKS web proxy
Stars: ✭ 571 (+59.94%)
Mutual labels:  proxy, http-proxy, proxy-server
Awesome Web Scraping
List of libraries, tools and APIs for web scraping and data processing.
Stars: ✭ 4,510 (+1163.31%)
Mutual labels:  proxy, proxy-server, proxy-list
Proxy List
A list of free, public, forward proxy servers. UPDATED DAILY!
Stars: ✭ 1,125 (+215.13%)
Mutual labels:  proxy, proxy-server, proxy-list
Beyond
BeyondCorp-inspired Access Proxy. Secure internal services outside your VPN/perimeter network during a zero-trust transition.
Stars: ✭ 151 (-57.7%)
Mutual labels:  proxy, http-proxy, proxy-server
Mallory
HTTP/HTTPS proxy over SSH
Stars: ✭ 251 (-29.69%)
Mutual labels:  proxy, http-proxy, proxy-server
LiveProxies
Asynchronous proxy checker
Stars: ✭ 17 (-95.24%)
Mutual labels:  proxy-server, http-proxy, proxy-list
image-crawler
An image scraper that scraps images from unsplash.com
Stars: ✭ 12 (-96.64%)
Mutual labels:  requests, webscraping
proxi
Proxy pool. Finds and checks proxies with rest api for querying results. Can find over 25k proxies in under 5 minutes.
Stars: ✭ 32 (-91.04%)
Mutual labels:  http-proxy, proxy-list
mps
MPS is a high-performance HTTP(S) proxy library that supports forward proxies, reverse proxies, man-in-the-middle proxies, tunnel proxies, Websocket proxies. MPS 是一个高性能HTTP(s)中间代理库,它支持正向代理、反向代理、中间人代理、隧道代理、Websocket代理
Stars: ✭ 64 (-82.07%)
Mutual labels:  proxy-server, http-proxy

Python Proxy Requests | make an http GET/POST with a proxy scraped from https://www.sslproxies.org/

Downloads Downloads Downloads

pypi.org: https://pypi.org/project/proxy-requests/

The ProxyRequests class first scrapes proxies from the web. Then it recursively attempts to make a request if the initial request with a proxy is unsuccessful.

Either copy the code and put where you want it, or download via pip:

pip install proxy-requests (or pip3)
from proxy_requests import ProxyRequests

or if you need the Basic Auth subclass as well:
from proxy_requests import ProxyRequests, ProxyRequestsBasicAuth

If the above import statement is used, method calls will be identical to the ones shown below. Pass a fully qualified URL when initializing an instance.

System Requirements: Python 3 and the requests module.

Runs on Linux and Windows (and Mac probably) - It may take a moment to run depending on the current proxy.
Each request with a proxy is set with an 3 second timeout in the event that the request takes too long (before trying the next proxy socket in the queue).

Proxies are randomly popped from the queue.

The ProxyRequestBasicAuth subclass has the methods get(), get_with_headers(), post(), post_with_headers(), post_file(), and post_file_with_headers() that will override the Parent methods.

GET:

    
r = ProxyRequests('https://api.ipify.org')
r.get()                                                                                                        
                                                                                                        

GET with headers:

                                                                                                          
                                                                                                         
h = {'User-Agent': 'NCSA Mosaic/3.0 (Windows 95)'}                                                             
r = ProxyRequests('url here')                                                                                  
r.set_headers(h)                                                                                               
r.get_with_headers()                                                                                           
                                                                                                        

POST:

                                                                                                          
                                                                                                         
r = ProxyRequests('url here')                                                                                  
r.post({'key1': 'value1', 'key2': 'value2'})                                                                   
                                                                                                        

POST with headers:

    
r = ProxyRequests('url here')
r.set_headers({'name': 'rootVIII', 'secret_message': '7Yufs9KIfj33d'})
r.post_with_headers({'key1': 'value1', 'key2': 'value2'})
    

POST FILE:

    
r = ProxyRequests('url here')
r.set_file('test.txt')
r.post_file()
    

POST FILE with headers:

    
h = {'User-Agent': 'NCSA Mosaic/3.0 (Windows 95)'}
r = ProxyRequests('url here')
r.set_headers(h)
r.set_file('test.txt')
r.post_file_with_headers()
    

GET with Basic Authentication:

    
r = ProxyRequestsBasicAuth('url here', 'username', 'password')
r.get()
    

GET with headers & Basic Authentication:

    
h = {'User-Agent': 'NCSA Mosaic/3.0 (Windows 95)'}
r = ProxyRequestsBasicAuth('url here', 'username', 'password')
r.set_headers(h)
r.get_with_headers()
    

POST with Basic Authentication:

    
r = ProxyRequestsBasicAuth('url here', 'username', 'password')
r.post({'key1': 'value1', 'key2': 'value2'})
    

POST with headers & Basic Authentication:

    
r = ProxyRequestsBasicAuth('url here', 'username', 'password')
r.set_headers({'header_key': 'header_value'})
r.post_with_headers({'key1': 'value1', 'key2': 'value2'})
    

POST FILE with Basic Authentication:

    
r = ProxyRequestsBasicAuth('url here', 'username', 'password')
r.set_file('test.txt')
r.post_file()
    

POST FILE with headers & Basic Authentication:

    
h = {'User-Agent': 'NCSA Mosaic/3.0 (Windows 95)'}
r = ProxyRequestsBasicAuth('url here', 'username', 'password')
r.set_headers(h)
r.set_file('test.txt')
r.post_file_with_headers()
    



Response Methods

Returns a string:
print(r)
Or if you want the raw content as bytes:
r.get_raw()
Get the response as JSON (if valid JSON):
r.get_json()
Get the response headers:
print(r.get_headers())
Get the status code:
print(r.get_status_code())
Get the URL that was requested:
print(r.get_url())
Get the proxy that was used to make the request:
print(r.get_proxy_used())

To write raw data to a file (including an image):

    

url = 'https://www.restwords.com/static/ICON.png'
r = ProxyRequests(url)
r.get()
with open('out.png', 'wb') as f:
    f.write(r.get_raw())

    

Dump the response to a file as JSON:
    
import json
with open('test.txt', 'w') as f:
    json.dump(r.get_json(), f)
    


This was developed on Ubuntu 16.04.4/18.04 LTS.
Author: rootVIII 2018-2020

example1
example1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].