PinguProxy
PinguProxy
  • Bảng giá
  • Blog
Đăng nhậpBắt đầu

Liên hệ

info@pinguproxy.com
Mọi hệ thống hoạt động bình thường

Pháp lý

  • Chính sách riêng tư
  • Chính sách cookie

Tài nguyên

  • Công cụ miễn phí
  • Tích hợp
  • Vị trí proxy
  • So sánh

Theo dõi chúng tôi

XXTelegramTelegramDiscordDiscordInstagramInstagram

Phương thức thanh toán

StripeStripe
Credit & Debit CardsSatispayRevolut Pay
© 2026 PinguProxy. Đã đăng ký bản quyền. P.IVA: 02776330397
Bắt đầu ngayDùng thử 1 ngày · Tạo tài khoản trong vài giây
    Quay lại blog

    Bài viết này hiện chỉ có sẵn bằng tiếng Anh.

    Đọc bằng tiếng Anh
    Tutorialpythoncoding2 phút đọc

    Using Python requests in 2025

    IA
    Iacopo Bonandi
    22:30:00 17 thg 1, 2025

    🐍 Introduction

    When working with proxies, Python's requests library is a go-to solution for sending HTTP requests efficiently. In this tutorial, we'll explore how to send a request to your endpoint and check if your proxy is working. Let's dive deeper into proxy usage together!


    💻 Setting Up Your Proxy Configuration

    To get started, you need to configure your proxy settings. Follow these step-by-step instructions:

    Step 1: Gather Your Proxy Credentials

    After purchasing a plan on PinguProxy, you’ll find your unique credentials in the dashboard.

    • Username: Your proxy username
    • Password: Your proxy password
    • Proxy IP: The proxy server IP address
    • Proxy Port: The port for the proxy server

    Step 2: Install the requests Library

    Ensure your Python environment has the requests library installed. You can install it by running the following command:

    pip install requests
    

    Step 3: Write the Python Script

    Here’s how to configure and test your proxy with Python:

    import requests
    
    # Step 3.1: Proxy credentials (replace with your values)
    USERNAME = "PROXY_USERNAME"
    PASSWORD = "PROXY_PASSWORD"
    PROXY_IP = "PROXY_IP"
    PROXY_PORT = "PROXY_PORT"
    
    # Step 3.2: Configure proxies
    proxies = {
        "http": f"http://{USERNAME}:{PASSWORD}@{PROXY_IP}:{PROXY_PORT}",
        "https": f"http://{USERNAME}:{PASSWORD}@{PROXY_IP}:{PROXY_PORT}",
    }
    
    # Step 3.3: Define the endpoint
    url = "https://pinguproxy.com/ip"
    
    try:
        # Step 3.4: Send a GET request through the proxy
        response = requests.get(url, proxies=proxies, timeout=10)
        response.raise_for_status()  # Raise an error for bad responses
        print("Your IP Address:", response.text)
    except requests.exceptions.RequestException as e:
        print(f"An error occurred: {e}")
    

    Step 4: Test Your Proxy

    Run the script to verify your proxy configuration. If everything is set up correctly, the endpoint will return the IP address seen by the server, confirming that your proxy works.

    Expected Output

    If the proxy is functional, you’ll see something like this:

    Your IP Address: xxxx:xxxx:xxxx:xxxx::
    

    If there’s an issue, an error message will appear:

    An error occurred: HTTPSConnectionPool(host='pinguproxy.com', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy'))
    

    🚀 Ready to Get Started?

    You’re now ready to harness the power of PinguProxy! If you have questions or need assistance, our support team is available 24/7 at info@pinguproxy.com.

    🐧 Try PinguProxy today and experience the difference!

    Get Started Now


    📚 Useful Resources

    • Contact Support
    • PinguProxy Dashboard

    Thank you for choosing PinguProxy. Your success is our mission! 💙

    Tiêu chuẩn biên tập

    Cập nhật lần cuối:5 tháng 3, 2025

    Các bài viết PinguProxy được đội ngũ kỹ thuật của chúng tôi viết và biên tập. Chúng tôi không chạy nội dung trả phí và các khuyến nghị phản ánh hành vi thực tế của sản phẩm khi tải. Phát hiện lỗi hoặc muốn tìm hiểu sâu hơn? Gửi email đến info@pinguproxy.com — chúng tôi sẽ cập nhật bài viết và ghi nhận phần sửa chữa.

    Liên hệ đội ngũ của chúng tôi qua liên hệ.

    Bài viết liên quan

    Trường hợp sử dụngWeb ScrapingTrường hợp sử dụngData for AITrường hợp sử dụngSERP MonitoringBài viết chínhCompare proxy types (datacenter, mobile, residential, TOR)Bài viết chínhPinguProxy plans & pricingBài viết chínhFree proxy & network tools (IP lookup, header checker, UA parser)Bài viết chínhProxy setup guides for Python, Scrapy, Playwright, and moreBài viết chínhResidential proxies by countryBài viết chínhPinguProxy vs Bright Data, Oxylabs, and other providers