HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib64/python3.10/site-packages/tldextract/__pycache__/remote.cpython-310.pyc
o

�h��@svdZddlmZddlZddlmZmZddlmZe�	dej
�Zee�Z
dd
d�Zddd
�Zddd�Zddd�ZdS)z=tldextract helpers for testing and fetching remote resources.�)�annotationsN)�AddressValueError�IPv6Address)�scheme_charszo^(?:(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$�url�str�returncCs�t|��d�d�d�d�d�d�d�d}|r2|ddkr2|�d�}|d	dkr2|d�d�S|�d
�d��}|�d�}|S)z�Extract the netloc of a URL-like string.

    Similar to the netloc attribute returned by
    urllib.parse.{urlparse,urlsplit}, but extract more leniently, without
    raising errors.
    �/r�?�#�@����[�]��:u
.。.。)�_schemeless_url�	partition�
rpartition�strip�rstrip)r�after_userinfo�
maybe_ipv6�hostname�without_root_label�r�G/usr/local/CyberPanel/lib/python3.10/site-packages/tldextract/remote.py�lenient_netlocs"�����

rcCsb|�d�}|dkr|dd�S|dks'||ddkr't|d|d��tr)|S||dd�S)Nz//r�rr)�find�set�scheme_chars_set)r�double_slashes_startrrrr+s
�r�maybe_ip�boolcCs|d��sdSt�|�duS)z7Check whether the given str looks like an IPv4 address.rFN)�isdigit�IP_RE�	fullmatch�r#rrr�
looks_like_ip8sr)cCs$zt|�WdStyYdSw)z7Check whether the given str looks like an IPv6 address.FT)rrr(rrr�looks_like_ipv6@s
��r*)rrrr)r#rrr$)�__doc__�
__future__r�re�	ipaddressrr�urllib.parser�compile�ASCIIr&r r!rrr)r*rrrr�<module>s�