
    3 dc                     $    d Z  G d d          ZdS )z
This module defines the Link object used in Link extractors.

For actual link extractors implementation see scrapy.linkextractors, or
its documentation in: docs/topics/link-extractors.rst
c                   4    e Zd ZdZg dZd
dZd Zd Zd Zd	S )Linka  Link objects represent an extracted link by the LinkExtractor.

    Using the anchor tag sample below to illustrate the parameters::

            <a href="https://example.com/nofollow.html#foo" rel="nofollow">Dont follow this one</a>

    :param url: the absolute url being linked to in the anchor tag.
                From the sample, this is ``https://example.com/nofollow.html``.

    :param text: the text in the anchor tag. From the sample, this is ``Dont follow this one``.

    :param fragment: the part of the url after the hash symbol. From the sample, this is ``foo``.

    :param nofollow: an indication of the presence or absence of a nofollow value in the ``rel`` attribute
                    of the anchor tag.
    urltextfragmentnofollow Fc                     t          |t                    s|j        j        }t	          d|           || _        || _        || _        || _        d S )Nz#Link urls must be str objects, got )	
isinstancestr	__class____name__	TypeErrorr   r   r   r   )selfr   r   r   r   gots         +lib/python3.11/site-packages/scrapy/link.py__init__zLink.__init__   sV    #s## 	I-(CG#GGHHH	      c                     | j         |j         k    o/| j        |j        k    o| j        |j        k    o| j        |j        k    S Nr   )r   others     r   __eq__zLink.__eq__&   sH    H	! 0	UZ'0/0 /		
r   c                     t          | j                  t          | j                  z  t          | j                  z  t          | j                  z  S r   )hashr   r   r   r   r   s    r   __hash__zLink.__hash__.   s=    NNT$)__,tDM/B/BBT$-EXEXX	
r   c           	      H    d| j         d| j        d| j        d| j        d	S )Nz	Link(url=z, text=z, fragment=z, nofollow=)r   r   s    r   __repr__zLink.__repr__3   sU    G G G49 G GG G48MG G G	
r   N)r	   r	   F)	r   
__module____qualname____doc__	__slots__r   r   r   r    r   r   r   r   	   sl         " 877I! ! ! !
 
 

 
 


 
 
 
 
r   r   N)r"   r   r$   r   r   <module>r%      sA    .
 .
 .
 .
 .
 .
 .
 .
 .
 .
r   