Coder Social home page Coder Social logo

just-one-proxy's Introduction

just-one-proxy

A Python module that will fetch only one proxy from any raw online file

Why?

I often require a lot of proxies in my api code, a few providers dont allow downloading to hdd. Thus in memory proxy tool was required. Problem being those tools often provide unchecked proxies.

This module was created as a proof-of-concept tool. Getting a proxy often requires downloading a proxy list, this tool reads random bytes from raw text files online (mostly for github public proxies).

How to Use

  1. Clone the repo / Download the justoneproxy.py file.
  2. import it using
import justoneproxy
  1. Ask justoneproxy to get a proxy using the get_proxy(url) method.
# url is optional

proxy_list_url = "https://raw.githubusercontent.com/jetkai/proxy-list/main/online-proxies/txt/proxies-http.txt"
proxy = justoneproxy.get_proxy(proxy_list_url)
print(proxy)

Known Bugs

- [ ] Proxy Lists with less content sizes throw errors. Currently the range function uses random integers instead of getting the target file size. The patch will be rolled out.

  • Tell Me?

Credits

  • Python3
  • Requests Documentation

just-one-proxy's People

Contributors

cypherpunksamurai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.