
    !h)                    p    S SK Jr  S SKJrJr  S SKJr  S SKJr  S SK	J
r
  \(       a  S SKr " S S\5      rg)	    )annotations)TYPE_CHECKINGcast)Failure)BaseRunSpiderCommand)
UsageErrorNc                  6    \ rS rSrSrSS jrSS jrS	S jrSrg)
Command   Tc                    g)Nz[options] <spider> selfs    \/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/scrapy/commands/crawl.pysyntaxCommand.syntax   s    #    c                    g)NzRun a spiderr   r   s    r   
short_descCommand.short_desc   s    r   c                b   [        U5      S:  a  [        e[        U5      S:  a  [        S5      eUS   nU R                  (       d   eU R                  R                  " U40 UR                  D6n[        USS 5      b?  [        [        [        UR                  5      R                  [        5      (       a  SU l        g U R                  R                  5         U R                  R                  (       d6  [        U R                  S5      (       a$  U R                  R                   (       a  SU l        g g g )N   zArunning 'scrapy crawl' with more than one spider is not supportedr   resulthas_exception)lenr   crawler_processcrawlspargsgetattr
issubclassr   r   r   type	Exceptionexitcodestartbootstrap_failedhasattrr   )r   argsoptsspnamecrawl_defers        r   runCommand.run   s    t9q=t9q=S  a####**00G4;;G;$/;
+,,-22IA
 A
 DM  &&(##44,,o>>((66 ! 7 ?r   )r#   N)returnstr)r'   z	list[str]r(   zargparse.Namespacer-   None)	__name__
__module____qualname____firstlineno__requires_projectr   r   r+   __static_attributes__r   r   r   r
   r
      s    $"r   r
   )
__future__r   typingr   r   twisted.python.failurer   scrapy.commandsr   scrapy.exceptionsr   argparser
   r   r   r   <module>r<      s'    " & * 0 ( ""  "r   