Skip to main content

Get proxies for free and automatically without any hassle.

Project description


📡 Link2Proxy 📡

Introduction

Welcome to Link2Proxy, a Python module that allows you to easily fetch and rotate proxies automatically. Whether you're scraping websites or need proxies for testing purposes, Link2Proxy helps you get free proxies from multiple sources, store them locally, and use them to make requests.

📝 Installation

To install Link2Proxy, you can clone this repository or install it via pip once the module is uploaded to PyPI.

pip install link2proxy

🔧 Usage

get_proxies()

This function allows you to fetch proxies from multiple online sources and store them locally in a file.

Example:

import link2proxy

# Fetch proxies from the available sources and save them to a file
link2proxy.get_proxies()
  • Description:

    • Fetches proxies from various online sources (e.g., spys.me, sslproxies.org, etc.).
    • Proxies are stored in a local file (link2proxy.txt).
    • This is useful if you need to periodically refresh your proxy list.
  • Parameters:

    • No parameters are needed.
  • Returns:

    • No return value. The proxies are saved in the local file.

get_proxy()

This function retrieves a proxy from the local file where they are stored. If the file is empty, it will automatically call get_proxies() to populate the list with fresh proxies.

Example:

import link2proxy

# Get a proxy and use it for a request
proxy = link2proxy.get_proxy()
print(requests.get('https://google.com', proxies=proxy).status_code)
  • Description:

    • Fetches one proxy from the saved list (stored in link2proxy.txt).
    • If the file is empty, it triggers get_proxies() to fetch fresh proxies.
  • Parameters:

    • No parameters are needed.
  • Returns:

    • A dictionary containing a proxy for both http and https:
      {"http://": "http://<proxy>", "https://": "https://<proxy>"}
      

📄 File Structure

The proxies are stored in a file called link2proxy.txt inside a folder called proxies in the root directory of your project. This file will contain a list of proxies in the format ip:port.

Example of file structure:

/project_directory
  /proxies
    link2proxy.txt

⚠️ Disclaimer

  • Please use this program only for educational purposes.
  • It is not meant to be used in any malicious way, and I decline any responsibility for what you do with it.

🔗 Connect with Zarby 🔗

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

link2proxy-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

link2proxy-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file link2proxy-0.1.0.tar.gz.

File metadata

  • Download URL: link2proxy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for link2proxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a1feb2f73b055c03e20b860df04632b38c4a627aa18d8eafbbf103252bf68a6
MD5 6cf82464fb327a4ff91e4faa7a840ab3
BLAKE2b-256 5fc0dd972ec94263da3f0bf4ad14e2e251857bda72ca36f48fd78bdec44ad47d

See more details on using hashes here.

File details

Details for the file link2proxy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: link2proxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for link2proxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c478028cc8963b130853fb2f66a3fc1318d3e304d5e32bb53f66f50afd4fded4
MD5 01783fe325ba34a4dffae6a0c14b4302
BLAKE2b-256 b50dfde992a9204b390f4460080c6eed1c0616227847de52395599a1a7b6e305

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page