관리-도구
편집 파일: collector.cpython-311.pyc
� �Dg�? � � � d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddlZ ddlm Z ddlmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZ ddlmZ ddl m!Z! dd l"m#Z#m$Z$ dd l%m&Z& ddl'm(Z( ddl)m*Z* dd l+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6m7Z7m8Z8 ej9 e:� � Z;ee<e<f Z=de<dee< fd�Z> G d� de?� � Z@de!ddfd�ZA G d� de?� � ZBde<de,ddfd�ZCde<de,de!fd�ZDd e=dee< fd!�ZE G d"� d#� � ZF G d$� d%e� � ZGd&eGdeGfd'�ZHeHd(d)dee( fd*�� � ZI e d+�,� � G d-� d)� � � � ZJ G d.� d/e� � ZK d<d0e(d1ee<e?f d2eed3 ddfd4�ZL d=de!d5eMdeJfd6�ZNd0e(de,ded) fd7�ZO G d8� d9e� � ZP G d:� d;� � ZQdS )>zO The main purpose of this module is to expose LinkCollector.collect_sources(). � N)� dataclass)� HTMLParser)�Values)�Callable�Dict�Iterable�List�MutableMapping� NamedTuple�Optional�Protocol�Sequence�Tuple�Union)�requests)�Response)� RetryError�SSLError)�NetworkConnectionError)�Link)�SearchScope)� PipSession)�raise_for_status)�is_archive_file��redact_auth_from_url)�vcs� )�CandidatesFromPage� LinkSource�build_source�url�returnc � � t j D ]D}| � � � � |� � r| t |� � dv r|c S �EdS )zgLook for VCS schemes in the URL. Returns the matched VCS scheme, or None if there's no match. z+:N)r �schemes�lower� startswith�len)r"