[Python] Can't request from a specific website (SSLV3_ALERT_HANDSHAKE_FAILURE)

Discussão em 'Python' iniciado por Stack, Fevereiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to request from a website, but no matter how I try, it refuses to connect and raises ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1018)

    Code I used:

    def fetch(license_plate: str, vehicle_type: VehicleType):
    url = f'https://www.csgt.vn/tra-cuu-phuong-tien-vi-pham.html?&LoaiXe={vehicle_type.value}&BienKiemSoat={license_plate}'
    r = requests.get(url)
    if r.status_code != 200:
    return None
    print(r.content)


    Worth to knows that:


    What I tried:

    • I switched between requests, urllib, and httpx library. Still no luck
    • I looked up online and saw I post on Stack Overflow to use an adapter, but still failed.
    • I updated all of my library.
    • I checked my PC internet settings.

    Continue reading...

Compartilhe esta Página