o
    _c                     @   s  d Z ddlZddlZddlmZ ddlZddlZddlZddlm	Z	 ddl
mZmZmZmZmZmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZmZ ddlmZ ddlmZ erfddl
m Z  e!e"Z#G dd deZ$G dd de%Z&ddddddddddddddd Z'G d!d" d"e%Z(d#e)d$e*fd%d&Z+G d'd( d(e%Z,i d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJi dKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdli dmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddddddddddd	Z-dS )zNetwork Manager module.    N)OrderedDict)SimpleNamespace)	AwaitableDictListOptionalUnionTYPE_CHECKING)unquote)EventEmitter)
CDPSession)NetworkError)FrameManagerFrame)
debugError)Multimap)Setc                       s  e Zd ZdZedddddZdeded	d
f fddZde	e
e
f d	d
fddZde	e
e
f d	d
fddZd	e	e
e
f fddZded	d
fddZde
d	d
fddZded	d
fddZdDddZde	d	d
fd d!Zd"e
d#ed	d
fd$d%Zded	d
fd&d'Zde	d(ee
 d	d
fd)d*Zde	d	d
fd+d,Z	
dEdd-d.ed/e	d0ed1ed2e	d	d
fd3d4Zd5e
d(ee
 d6e
d7ed8e
d9e	d:ee
 d;ed- d	d
fd<d=Zded	d
fd>d?Zded	d
fd@dAZded	d
fdBdCZ   Z!S )FNetworkManagerzNetworkManager class.requestresponseZrequestfailedZrequestfinished)RequestResponseRequestFailedRequestFinishedclientframeManagerreturnNc                    s   t    | _| _t  _t  _t  _d _	d _
t  _d _d _t  _t  _ jd fdd  jd j  jd j  jd j  jd	 j  jd
 j dS )zMake new NetworkManager.FNzNetwork.requestWillBeSentc                    s    j j | S N)_client_loopcreate_task_onRequestWillBeSent)eventself D/usr/local/lib/python3.10/dist-packages/pyppeteer/network_manager.py<lambda>:   s    z)NetworkManager.__init__.<locals>.<lambda>zNetwork.requestInterceptedzNetwork.requestServedFromCachezNetwork.responseReceivedzNetwork.loadingFinishedzNetwork.loadingFailed)super__init__r   _frameManagerdict_requestIdToRequest_requestIdToResponseWillBeSentr   _extraHTTPHeaders_offline_credentialsset_attemptedAuthentications_userRequestInterceptionEnabled#_protocolRequestInterceptionEnabledr   _requestHashToRequestIds_requestHashToInterceptionIdson_onRequestIntercepted_onRequestServedFromCache_onResponseReceived_onLoadingFinished_onLoadingFailed)r$   r   r   	__class__r#   r&   r)   (   s,   

zNetworkManager.__init__credentialsc                       || _ |  I dH  dS )z"Provide credentials for http auth.N)r0   "_updateProtocolRequestInterception)r$   r?   r%   r%   r&   authenticateD      zNetworkManager.authenticateextraHTTPHeadersc                    sl   t  | _| D ]\}}t|tstd| dt| d|| j| < q	| j	dd| jiI dH  dS )zSet extra http headers.zExpected value of header "z" to be string, but z
 is found.zNetwork.setExtraHTTPHeadersheadersN)
r   r.   items
isinstancestr	TypeErrortypelowerr   send)r$   rD   kvr%   r%   r&   setExtraHTTPHeadersI   s   
z"NetworkManager.setExtraHTTPHeadersc                 C   s   t di | jS )zGet extra http headers.Nr%   )r+   r.   r#   r%   r%   r&   rD   V   s   zNetworkManager.extraHTTPHeadersvaluec                    s:   | j |krdS || _ | jd| j ddddI dH  dS )z#Change offline mode enable/disable.Nz Network.emulateNetworkConditionsr   )ZofflineZlatencyZdownloadThroughputZuploadThroughput)r/   r   rL   r$   rP   r%   r%   r&   setOfflineModeZ   s   
zNetworkManager.setOfflineMode	userAgentc                    s   | j dd|iI dH  dS )zSet user agent.zNetwork.setUserAgentOverriderT   N)r   rL   )r$   rT   r%   r%   r&   setUserAgentf   s   zNetworkManager.setUserAgentc                    r@   )zEnable request interception.N)r3   rA   rR   r%   r%   r&   setRequestInterceptionk   rC   z%NetworkManager.setRequestInterceptionc                    sj   | j pt| j}|| jkrd S || _|rddigng }t| jdd|i| jdd|iI d H  d S )NZ
urlPattern*zNetwork.setCacheDisabledZcacheDisabledzNetwork.setRequestInterceptionpatterns)r3   boolr0   r4   asynciogatherr   rL   )r$   enabledrX   r%   r%   r&   rA   p   s$   
z1NetworkManager._updateProtocolRequestInterceptionr"   c                    s~   | j r7t|di }| j|}|r#| || | j|| d S | j||d || j	|d< d S | |d  d S )Nr   	requestId)
r4   generateRequestHashgetr6   
firstValue
_onRequestdeleter5   r1   r-   )r$   r"   requestHashinterceptionIdr%   r%   r&   r!      s   z#NetworkManager._onRequestWillBeSentmethodmsgc              
      sN   z| j ||I d H  W d S  ty& } ztt| W Y d }~d S d }~ww r   )r   rL   	Exceptionr   logger)r$   re   rf   er%   r%   r&   _send   s   zNetworkManager._sendc              
   C   s$  | drFd}|d | jv rd}n| jrd}| j|d  t| di  d}t| di  d}| jj| d	|d |||d
d d S | j	s[| j
r[| jj| d	d|d i t|d }| j|}|r| j| }| || d | j|| | j|d  d S | j||d  d S )NZauthChallengeZDefaultrd   Z
CancelAuthZProvideCredentialsr0   usernamepassword"Network.continueInterceptedRequest)r   rk   rl   )rd   ZauthChallengeResponser   )r_   r2   r0   addgetattrr   r   r    rj   r3   r4   r^   r5   r`   r-   ra   rb   popr6   r1   )r$   r"   r   rk   rl   rc   r]   ZrequestWillBeSentEventr%   r%   r&   r8      sF   


z$NetworkManager._onRequestInterceptedrd   c                 C   s   t  }|dr2| j|d }|r2|d }| ||d|d|d|d|d |j}t|d|dkoC|d	d
k}| |d ||di d||d	d|di |d| d S )NredirectResponser]   statusrE   fromDiskCachefromServiceWorkerSecurityDetailsZloaderIdrJ   ZDocumentr   url frameId)listr_   r,   _handleRequestRedirect_redirectChainrY   _handleRequestStart)r$   r"   rd   redirectChainr   rq   isNavigationRequestr%   r%   r&   ra      s8   


zNetworkManager._onRequestc                 C   s$   | j |d}|rd|_d S d S )Nr]   T)r,   r_   _fromMemoryCache)r$   r"   r   r%   r%   r&   r9      s   
z(NetworkManager._onRequestServedFromCacher   redirectStatusredirectHeadersrs   rt   securityDetailsc                 C   sx   t | j||||||}||_|j| |td | j|j	d  | j
|j | tjj | | tjj| d S )Nz2Response body is unavailable for redirect response)r   r   	_responser{   append_bodyLoadedPromiseFulfillr   r,   rp   
_requestIdr2   discard_interceptionIdemitr   Eventsr   )r$   r   r   r   rs   rt   r   r   r%   r%   r&   rz      s   
z%NetworkManager._handleRequestRedirectr]   rv   r~   resourceTyperequestPayloadrx   r}   c	                 C   sZ   d }	|r| j d ur| j |}	t| j|||| j||||	|
}
|
| j|< | tjj|
 d S r   )	r*   framer   r   r3   r,   r   r   r   )r$   r]   rd   rv   r~   r   r   rx   r}   r   r   r%   r%   r&   r|      s   

z"NetworkManager._handleRequestStartc              
   C   sv   | j |d }|sd S |di }t| j||dd|di |d|d|d}||_| tjj| d S )	Nr]   r   rr   r   rE   rs   rt   r   )r,   r_   r   r   r   r   r   r   )r$   r"   r   Z_respr   r%   r%   r&   r:     s   

z"NetworkManager._onResponseReceivedc                 C   s^   | j |d }|sd S |j}|r|d  | j |jd  | j|j | 	t
jj| d S )Nr]   )r,   r_   r   r   rp   r   r2   r   r   r   r   r   r   r$   r"   r   r   r%   r%   r&   r;     s   
z!NetworkManager._onLoadingFinishedc                 C   sj   | j |d }|sd S |d|_|j}|r|d  | j |jd  | j|j	 | 
tjj| d S )Nr]   	errorText)r,   r_   _failureTextr   r   rp   r   r2   r   r   r   r   r   r   r   r%   r%   r&   r<      s   
zNetworkManager._onLoadingFailed)r   Nr   )"__name__
__module____qualname____doc__r   r   r   r   r)   r   rH   rB   rO   rD   rY   rS   rU   rV   rA   r!   r+   rj   r8   r   ra   r9   intrz   r   r|   r:   r;   r<   __classcell__r%   r%   r=   r&   r      sn    

)

r   c                   @   sT  e Zd ZdZdedee dee dedededed	ed
ee	 de
d  ddfddZedefddZedefddZedee fddZedee fddZedefddZeded fddZedee	 fddZdefdd Zede
d  fd!d"Zdee fd#d$Zd/d%eddfd&d'Zd(eddfd)d*Zd0d,eddfd-d.ZdS )1r   a  Request class.

    Whenever the page sends a request, such as for a network resource, the
    following events are emitted by pyppeteer's page:

    - ``'request'``: emitted when the request is issued by the page.
    - ``'response'``: emitted when/if the response is received for the request.
    - ``'requestfinished'``: emitted when the response body is downloaded and
      the request is complete.

    If request fails at some point, then instead of ``'requestfinished'`` event
    (and possibly instead of ``'response'`` event), the ``'requestfailed'``
    event is emitted.

    If request gets a ``'redirect'`` response, the request is successfully
    finished with the ``'requestfinished'`` event, and a new request is issued
    to a redirect url.
    r   r]   rd   r~   allowInterceptionrv   r   payloadr   r}   r   Nc                 C   s   || _ || _|| _|| _|| _d| _d | _d | _|| _|	 | _
|d| _|d| _|di }dd | D | _|	| _|
| _d| _d S )NFre   postDatarE   c                 S      i | ]	\}}|  |qS r%   rK   .0rM   rN   r%   r%   r&   
<dictcomp>W      z$Request.__init__.<locals>.<dictcomp>)r   r   _isNavigationRequestr   _allowInterception_interceptionHandledr   r   _urlrK   _resourceTyper_   _method	_postDatarF   _headers_framer{   r   )r$   r   r]   rd   r~   r   rv   r   r   r   r}   rE   r%   r%   r&   r)   C  s"   

zRequest.__init__c                 C      | j S )zURL of this request.r   r#   r%   r%   r&   rv   ]     zRequest.urlc                 C   r   )a;  Resource type of this request perceived by the rendering engine.

        ResourceType will be one of the following: ``document``,
        ``stylesheet``, ``image``, ``media``, ``font``, ``script``,
        ``texttrack``, ``xhr``, ``fetch``, ``eventsource``, ``websocket``,
        ``manifest``, ``other``.
        )r   r#   r%   r%   r&   r   b  s   	zRequest.resourceTypec                 C   r   )z/Return this request's method (GET, POST, etc.).)r   r#   r%   r%   r&   re   m  r   zRequest.methodc                 C   r   )z!Return post body of this request.)r   r#   r%   r%   r&   r   r  r   zRequest.postDatac                 C   r   )zgReturn a dictionary of HTTP headers of this request.

        All header names are lower-case.
        r   r#   r%   r%   r&   rE   w     zRequest.headersr   c                 C   r   )zReturn matching :class:`Response` object, or ``None``.

        If the response has not been received, return ``None``.
        )r   r#   r%   r%   r&   r     r   zRequest.responsec                 C   r   )zReturn a matching :class:`~pyppeteer.frame_manager.frame` object.

        Return ``None`` if navigating to error page.
        )r   r#   r%   r%   r&   r     r   zRequest.framec                 C   r   )z3Whether this request is driving frame's navigation.)r   r#   r%   r%   r&   r~     s   zRequest.isNavigationRequestc                 C   s   t  | jS )a  Return chain of requests initiated to fetch a resource.

        * If there are no redirects and request was successful, the chain will
          be empty.
        * If a server responds with at least a single redirect, then the chain
          will contain all the requests that were redirected.

        ``redirectChain`` is shared between all the requests of the same chain.
        )copyr{   r#   r%   r%   r&   r}     s   zRequest.redirectChainc                 C   s   | j sdS d| j iS )a:  Return error text.

        Return ``None`` unless this request was failed, as reported by
        ``requestfailed`` event.

        When request failed, this method return dictionary which has a
        ``errorText`` field, which contains human-readable error message, e.g.
        ``'net::ERR_RAILED'``.
        Nr   )r   r#   r%   r%   r&   failure  s   

zRequest.failure	overridesc              
      s   |du ri }| j std| jrtdd| _d| ji}|| z| jd|I dH  W dS  tyG } ztt	| W Y d}~dS d}~ww )aY  Continue request with optional request overrides.

        To use this method, request interception should be enabled by
        :meth:`pyppeteer.page.Page.setRequestInterception`. If request
        interception is not enabled, raise ``NetworkError``.

        ``overrides`` can have the following fields:

        * ``url`` (str): If set, the request url will be changed.
        * ``method`` (str): If set, change the request method (e.g. ``GET``).
        * ``postData`` (str): If set, change the post data or request.
        * ``headers`` (dict): If set, change the request HTTP header.
        N$Request interception is not enabled.Request is already handled.Trd   rm   )
r   r   r   r   updater   rL   rg   r   rh   )r$   r   optri   r%   r%   r&   	continue_  s    

zRequest.continue_r   c              
      s  | j dr	dS | jstd| jrtdd| _|dr.t|d tr.|d d}n|d}i }|drK|d D ]}|d | ||	 < q>|d	rV|d	 |d
< |rbd|vrbt
||d< |dd}t|d}d| d| }d}|| }	|D ]}|	 | d||  | }	q~|	| }	|	d}
|r|
| }
t|
d}z| jd| j|dI dH  W dS  ty } ztt| W Y d}~dS d}~ww )aV  Fulfills request with given response.

        To use this, request interception should by enabled by
        :meth:`pyppeteer.page.Page.setRequestInterception`. Request
        interception is not enabled, raise ``NetworkError``.

        ``response`` is a dictionary which can have the following fields:

        * ``status`` (int): Response status code, defaults to 200.
        * ``headers`` (dict): Optional response headers.
        * ``contentType`` (str): If set, equals to setting ``Content-Type``
          response header.
        * ``body`` (str|bytes): Optional response body.
        data:Nr   r   Tbodyutf-8rE   contentTypezcontent-typezcontent-lengthrr      rw   z	HTTP/1.1  z
z: asciirm   )rd   rawResponse)r   
startswithr   r   r   r_   rG   rH   encoderK   lenstatusTextsbase64	b64encodedecoder   rL   r   rg   r   rh   )r$   r   ZresponseBodyZresponseHeadersheaderZ
statusCodeZ
statusTextZ
statusLineCRLFtextZresponseBufferr   ri   r%   r%   r&   respond  sP   



zRequest.respondfailed	errorCodec              
      s   t | }|std|| jstd| jrtdd| _z| jdt| j|dI dH  W dS  t	yI } zt
t| W Y d}~dS d}~ww )ar  Abort request.

        To use this, request interception should be enabled by
        :meth:`pyppeteer.page.Page.setRequestInterception`.
        If request interception is not enabled, raise ``NetworkError``.

        ``errorCode`` is an optional error code string. Defaults to ``failed``,
        could be one of the following:

        - ``aborted``: An operation was aborted (due to user action).
        - ``accessdenied``: Permission to access a resource, other than the
          network, was denied.
        - ``addressunreachable``: The IP address is unreachable. This usually
          means that there is no route to the specified host or network.
        - ``blockedbyclient``: The client chose to block the request.
        - ``blockedbyresponse``: The request failed because the request was
          delivered along with requirements which are not met
          ('X-Frame-Options' and 'Content-Security-Policy' ancestor check,
          for instance).
        - ``connectionaborted``: A connection timeout as a result of not
          receiving an ACK for data sent.
        - ``connectionclosed``: A connection was closed (corresponding to a TCP
          FIN).
        - ``connectionfailed``: A connection attempt failed.
        - ``connectionrefused``: A connection attempt was refused.
        - ``connectionreset``: A connection was reset (corresponding to a TCP
          RST).
        - ``internetdisconnected``: The Internet connection has been lost.
        - ``namenotresolved``: The host name could not be resolved.
        - ``timedout``: An operation timed out.
        - ``failed``: A generic failure occurred.
        zUnknown error code: {}r   r   Trm   )rd   errorReasonN)errorReasonsr   formatr   r   r   rL   r+   r   rg   r   rh   )r$   r   r   ri   r%   r%   r&   abort  s$   !
zRequest.abortr   )r   )r   r   r   r   r   r   rH   rY   r+   r   r   r)   propertyrv   r   re   r   r   rE   r   r   r~   r}   r   r   r   r   r%   r%   r%   r&   r   /  sT    

;r   ZAbortedZAccessDeniedZAddressUnreachableZBlockedByClientZBlockedByResponseZConnectionAbortedZConnectionClosedZConnectionFailedZConnectionRefusedZConnectionResetZInternetDisconnectedZNameNotResolvedZTimedOutZFailed)ZabortedZaccessdeniedZaddressunreachableZblockedbyclientZblockedbyresponseZconnectionabortedZconnectionclosedZconnectionfailedZconnectionrefusedZconnectionresetZinternetdisconnectedZnamenotresolvedZtimedoutr   c                   @   s0  e Zd ZdZ	d)dedededeeef de	de	d	ed
dfddZ
dee d
dfddZed
efddZed
e	fddZed
efddZed
efddZed
eedf fddZd
efddZd
ee fddZd
efdd Zd
efd!d"Zed
efd#d$Zed
e	fd%d&Zed
e	fd'd(ZdS )*r   zCResponse class represents responses which are received by ``Page``.Nr   r   rr   rE   rs   rt   r   r   c                 C   s   || _ || _|| _| j j | _| j j | _|j| _|| _	|| _
dd | D | _i | _|rEt|d |d |d |d |d | _d S d S )Nc                 S   r   r%   r   r   r%   r%   r&   r   [  r   z%Response.__init__.<locals>.<dictcomp>subjectNameissuer	validFromvalidToprotocol)r   _request_statusr   create_future_contentPromise_bodyLoadedPromiserv   r   _fromDiskCache_fromServiceWorkerrF   r   _securityDetailsru   )r$   r   r   rr   rE   rs   rt   r   r%   r%   r&   r)   N  s&   
zResponse.__init__rP   c                 C   s   | j | d S r   )r   
set_resultrR   r%   r%   r&   r   f  s   z"Response._bodyLoadedPromiseFulfillc                 C   r   )zURL of the response.r   r#   r%   r%   r&   rv   i  r   zResponse.urlc                 C   s$   | j dkpd| j   kodkS   S )z@Return bool whether this request is successful (200-299) or not.r   r   i+  r   r#   r%   r%   r&   okn  s   $zResponse.okc                 C   r   )zStatus code of the response.r   r#   r%   r%   r&   rr   s  r   zResponse.statusc                 C   r   )zfReturn dictionary of HTTP headers of this response.

        All header names are lower-case.
        r   r#   r%   r%   r&   rE   x  r   zResponse.headersru   c                 C   r   )zReturn security details associated with this response.

        Security details if the response was received over the secure
        connection, or `None` otherwise.
        )r   r#   r%   r%   r&   r     s   zResponse.securityDetailsc                    s\   | j I d H }t|tr|| jdd| jjiI d H }|dd}|dr,t	|S |S )NzNetwork.getResponseBodyr]   r       Zbase64Encoded)
r   rG   rg   r   rL   r   r   r_   r   	b64decode)r$   resultr   r   r%   r%   r&   _bufread  s   


zResponse._bufreadc                 C   s"   | j  s| jj|  S | j S )z<Return awaitable which resolves to bytes with response body.)r   doner   r   r    r   r#   r%   r%   r&   buffer  s   
zResponse.bufferc                    s(   |   I dH }t|tr|S |dS )z)Get text representation of response body.Nr   )r   rG   rH   r   r$   contentr%   r%   r&   r     s
   

zResponse.textc                    s   |   I dH }t|S )z)Get JSON representation of response body.N)r   jsonloadsr   r%   r%   r&   r     s   
zResponse.jsonc                 C   r   )z%Get matching :class:`Request` object.)r   r#   r%   r%   r&   r     r   zResponse.requestc                 C   s   | j p| jjS )zReturn ``True`` if the response was served from cache.

        Here `cache` is either the browser's disk cache or memory cache.
        )r   r   r   r#   r%   r%   r&   	fromCache  s   zResponse.fromCachec                 C   r   )z?Return ``True`` if the response was served by a service worker.)r   r#   r%   r%   r&   rt     r   zResponse.fromServiceWorkerr   )r   r   r   r   r   r   r   r   rH   rY   r)   r   rg   r   r   rv   r   rr   rE   r   r   bytesr   r   r   r   r+   r   r   r   rt   r%   r%   r%   r&   r   K  sF    

r   r   r   c                 C   s   |  dd}zt|}W n	 ty   Y nw ||  d|  di d}|dsNt| d  }|  |D ]}| d | }| }|dv rGq6||d |< q6t	|S )	zGenerate request hash.rv   rw   re   r   )rv   re   r   rE   r   rE   )acceptZrefererz/x-devtools-emulate-network-conditions-client-idcookie)
r_   r
   rg   r   ry   keyssortrK   r   dumps)r   ZnormalizedURL_hashrE   r   ZheaderValuer%   r%   r&   r^     s*   

r^   c                   @   s   e Zd ZdZdedededededdfd	d
ZedefddZedefddZ	edefddZ
edefddZedefddZdS )ru   z6Class represents responses which are received by page.r   r   r   r   r   r   Nc                 C   s"   || _ || _|| _|| _|| _d S r   )_subjectName_issuer
_validFrom_validTo	_protocol)r$   r   r   r   r   r   r%   r%   r&   r)     s
   
zSecurityDetails.__init__c                 C   r   )z:Return the subject to which the certificate was issued to.)r   r#   r%   r%   r&   r     r   zSecurityDetails.subjectNamec                 C   r   )z;Return a string with the name of issuer of the certificate.)r   r#   r%   r%   r&   r     r   zSecurityDetails.issuerc                 C   r   )z<Return UnixTime of the start of validity of the certificate.)r   r#   r%   r%   r&   r     r   zSecurityDetails.validFromc                 C   r   )z:Return UnixTime of the end of validity of the certificate.)r   r#   r%   r%   r&   r     r   zSecurityDetails.validToc                 C   r   )z;Return string of with the security protocol, e.g. "TLS1.2".)r   r#   r%   r%   r&   r     r   zSecurityDetails.protocol)r   r   r   r   rH   r   r)   r   r   r   r   r   r   r%   r%   r%   r&   ru     s&    
ru   100ContinueZ101zSwitching ProtocolsZ102
ProcessingZ200OKZ201CreatedZ202AcceptedZ203zNon-Authoritative InformationZ204z
No ContentZ206zPartial ContentZ207zMulti-StatusZ208zAlready ReportedZ209zIM UsedZ300zMultiple ChoicesZ301zMoved PermanentlyZ302FoundZ303z	See OtherZ304zNot ModifiedZ305z	Use ProxyZ306zSwitch ProxyZ307zTemporary RedirectZ308zPermanent RedirectZ400zBad RequestZ401UnauthorizedZ402zPayment RequiredZ403	ForbiddenZ404z	Not FoundZ405zMethod Not AllowedZ406zNot AcceptableZ407zProxy Authentication RequiredZ408zRequest TimeoutZ409ConflictZ410GoneZ411zLength RequiredZ412zPrecondition FailedZ413zPayload Too LargeZ414zURI Too LongZ415zUnsupported Media TypeZ416zRange Not SatisfiableZ417zExpectation FailedZ418zI'm a teapotZ421zMisdirected RequestZ422zUnprocessable EntityZ423Locked424zFailed DependencyZ426zUpgrade RequiredZ428zPrecondition RequiredZ429zToo Many RequestsZ431zRequest Header Fields Too LargeZ451zUnavailable For Legal Reasons500zInternal Server ErrorZ501zNot ImplementedzBad GatewayzService UnavailablezGateway TimeoutzHTTP Version Not SupportedzVariant Also NegotiateszInsufficient StoragezLoop DetectedzNot ExtendedzNetwork Authentication Required)	Z502Z503Z504Z505Z506Z507Z508Z510Z511).r   rZ   r   collectionsr   r   r   loggingtypesr   typingr   r   r   r   r   r	   urllib.parser
   Zpyeer   Zpyppeteer.connectionr   Zpyppeteer.errorsr   Zpyppeteer.frame_managerr   r   Zpyppeteer.helperr   Zpyppeteer.multimapr   r   	getLoggerr   rh   r   objectr   r   r   r+   rH   r^   ru   r   r%   r%   r%   r&   <module>   s8   
    p %	
 !"#$%&'()*+,-./01234