
    3 d7                     :    d dl mZ d dlmZ  G d de          ZdS )    )BaseRunSpiderCommand)
UsageErrorc                   $    e Zd ZdZd Zd Zd ZdS )CommandTc                     dS )Nz[options] <spider> selfs    5lib/python3.11/site-packages/scrapy/commands/crawl.pysyntaxzCommand.syntax	   s    ##    c                     dS )NzRun a spiderr   r	   s    r   
short_desczCommand.short_desc   s    ~r   c                    t          |          dk     rt                      t          |          dk    rt          d          |d         } | j        j        |fi |j        }t          |dd           (t          |j        j        t                    r	d| _
        d S | j                                         | j        j        s!t          | j        d          r| j        j        rd| _
        d S d S d S )N   zArunning 'scrapy crawl' with more than one spider is not supportedr   resulthas_exception)lenr   crawler_processcrawlspargsgetattr
issubclassr   type	Exceptionexitcodestartbootstrap_failedhasattrr   )r
   argsoptsspnamecrawl_defers        r   runzCommand.run   s   t99q= 	,,YY] 	S   a0d*0GG4;GG;$// 	"
#YA
 A
 	" DMMM &&((( $5"4/AA" (6"
 !"" " " "r   N)__name__
__module____qualname__requires_projectr   r   r$   r   r   r   r   r      sG        $ $ $  " " " " "r   r   N)scrapy.commandsr   scrapy.exceptionsr   r   r   r   r   <module>r+      s^    0 0 0 0 0 0 ( ( ( ( ( (!" !" !" !" !"" !" !" !" !" !"r   