+
    \i                     f    ^ RI H t  ^ RIHt ^ RIHtHtHtHtHt ^ RI	H
t
 ^ RIHt  ! R R4      tR# )	    )datetime)
HTMLParser)DictListMappingTupleUnion)retrieve_url)prettyPrinterc                   z   a  ] tR t^t o RtRtRRRRRR/t ! R R	]4      tRV 3R
 lR llt	RV 3R lR llt
RtV tR# )solidtorrentszhttps://solidtorrents.tozSolid TorrentsallmusicAudiobookseBookc                   z   a  ] tR t^$t o V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R	 lR
 ltRt	V t
R# )solidtorrents.TorrentInfoParserc                $   < V ^8  d   QhRS[ RR/# )   urlreturnNstr)format__classdict__s   "2/config/qBittorrent/nova3/engines/solidtorrents.py__annotate__,solidtorrents.TorrentInfoParser.__annotate__&   s     	: 	: 	: 	:    c                   \         P                  ! V 4       Wn        R V n        R V n        R V n        R V n        R V n        R V n        R V n	        R V n
        ^ V n        R V n        ^ V n        V P                  4       V n        R# FN)r   __init__r   foundResult
foundTitle
parseTitle
foundStatsparseSeedersparseLeechers	parseSize	parseDatecolumntorrentReadytotalResultsempty_torrent_infotorrent_info)selfr   s   &&r   r#   (solidtorrents.TorrentInfoParser.__init__&   sx    %H$D#DO#DO#DO %D!&D"DN"DNDK %D !D $ 7 7 9Dr    c                6   < V ^8  d   QhRS[ S[S[3,          /# )r   r   )r   r   object)r   r   s   "r   r   r   7   s     
	 
	S&[(9 
	r    c                :    R RRRRRRRRRRV P                   RRR	R
/# )link namesizez-1seedsleech
engine_url	desc_linkpub_date)r   )r1   s   &r   r/   2solidtorrents.TorrentInfoParser.empty_torrent_info7   s8    dhhRB	 	r    c          	      d   < V ^8  d   QhRS[ RS[S[S[ S[S[ R3,          3,          ,          RR/# )r   tagattrsNr   )r   r   r   r	   )r   r   s   "r   r   r   C   s;     (	) (	)s (	)4c5dCS>S8T3U (	)Z^ (	)r    c                   R  R lp\        V4      pRV! VR4      9   d
   RV n        R# V P                  '       d   RV! VR4      9   d   VR8X  d   RV n        V P                  '       d6   VR8X  d/   V P                  V! VR	4      ,           V P                  R
&   RV n        V P                  '       d   RV! VR4      9   d   RV n        RV n        V P                  '       d8   VR8X  d1   V P                  ^,           V n        V P                  ^8X  d   RV n        V P                  '       d    VR8X  d   V P                  ^8X  d   RV n	        V P                  '       d    VR8X  d   V P                  ^8X  d   RV n
        V P                  '       d    VR8X  d   V P                  ^8X  d   RV n        V P                  '       dH   RV! VR4      9   d8   VR8X  d/   VP                  R	4      V P                  R&   RV n        RV n        R# R# R# R# )c                x    V ^8  d   QhR\         \        \        \        R3,          3,          R\        R\        /# )r   dNkeyr   )r   r   r	   )r   s   "r   r   Esolidtorrents.TorrentInfoParser.handle_starttag.<locals>.__annotate__D   s4     : :'#uS$Y'7"78 :s :s :r    c                 6    V P                  VR 4      pVe   V# R # )r7   )get)rF   rG   values   && r   getStr?solidtorrents.TorrentInfoParser.handle_starttag.<locals>.getStrD   s!    c2 % 1u9r9r    zsearch-resultclassTNtitleh5ahrefr=   statsdivfontz	dl-magnetr6   Fr?   )dictr$   r%   r   r0   r&   r'   r,   r*   r(   r)   r+   rJ   r-   )r1   rB   rC   rL   paramss   &&&  r   handle_starttag/solidtorrents.TorrentInfoParser.handle_starttagC   s   : %[F&"99#' Wvw0G%GcUYk"&C3J15F66<R1R!!+."&Wvw0G%G"& C5L"kkAo;;!#%)DNC6Mq8H$(!C6Mq8H%)"C5Lt{{a7G!%[F674K%KRUY\R\,2JJv,>!!&)#( $(! S]%Kr    c                $   < V ^8  d   QhRS[ RR/# )r   rB   r   Nr   )r   r   s   "r   r   r   m   s     	' 	'S 	'T 	'r    c                    V P                   '       dM   \        V P                  4       R V n         V P                  4       V n        V ;P                  ^,          un        R# R# r"   )r-   r   r0   r/   r.   )r1   rB   s   &&r   handle_endtag-solidtorrents.TorrentInfoParser.handle_endtagm   sK       d//0$)!$($;$;$=!!!Q&!	 !r    c                $   < V ^8  d   QhRS[ RR/# )r   datar   Nr   )r   r   s   "r   r   r   t   s     	( 	(C 	(D 	(r    c                P   V P                   '       dC   \        VP                  4       4      '       d   VR 8w  d   WP                  R&   RV n         RV n        V P
                  '       d   WP                  R&   RV n        V P                  '       d   WP                  R&   RV n        V P                  '       d   WP                  R&   RV n        V P                  '       d    . R
OpVP                  RR4      P                  4       P                  4       w  r4p\        \        V4      \        VP                  V4      ^,           4      \        V4      4      p\        VP                  4       4      V P                  R&   RV n        RV n        R	# R	#   \          d    RT P                  R&    L.i ; i)
r8   Fr9   r:   r;   ,r7   r>   N)janfebmaraprmayjunjulaugsepoctnovdecr?   )r&   boolstripr0   r%   r*   r(   r)   r+   replacelowersplitr   intindex	timestamp	Exceptionr'   )r1   r_   monthsmonthdayyeardates   &&     r   handle_data+solidtorrents.TorrentInfoParser.handle_datat   sY   &&44<04%%f-"'"'~~~,0!!&)!&   -1!!'*$)!!!!-1!!'*%*"~~~7HF)-c2)>)D)D)F)L)L)N&U#CIs6<<3F3J/KSQTXVD478H4ID%%j1 "'"'  ! 746D%%j17s   BF F%$F%)r,   r$   r'   r%   r+   r)   r(   r*   r&   r-   r0   r.   r   N)__name__
__module____qualname____firstlineno__r#   r/   rX   r\   r}   __static_attributes____classdictcell__r   s   @r   TorrentInfoParserr   $   s8     	: 	:"
	 
	(	) (	)T	' 	'	( 	(r    r   c                2   < V ^8  d   QhRS[ RS[ RS[RS[ /# )r   
searchTermcategorypager   )r   rt   )r   r   s   "r   r   solidtorrents.__annotate__   s)     ; ;# ; ;C ; ;r    c                    \        V P                  R ,           V,           R,           V,           R,           \        V4      ,           4      # )z
/search?q=z
&category=z&sort=seeders&sort=desc&page=)r
   r   r   )r1   r   r   r   s   &&&&r   requestsolidtorrents.request   s>    HH|#j0<?(J-.03D	:; 	;r    c                *   < V ^8  d   QhRS[ RS[ RR/# )r   whatcatr   Nr   )r   r   s   "r   r   r      s"      3 S T r    c                   V P                   V,          p\        ^^4       Fc  pV P                  V P                  4      pVP	                  V P                  WV4      4       VP                  4        VP                  ^8  g   Kb   R# 	  R# )   N)supported_categoriesranger   r   feedr   closer.   )r1   r   r   r   r   parsers   &&&   r   searchsolidtorrents.search   sg    ,,S1!QKD++DHH5FKKTT:;LLN""R'  r     N)r   )r   )r   r   r   r   r   r8   r   r   r   r   r   r   r   r   s   @r   r   r      sJ     
$CD!5'7GWMo(J o(b; ;
  r    r   N)r   html.parserr   typingr   r   r   r   r	   helpersr
   novaprinterr   r   r   r    r   <module>r      s%   .  " 4 4   %C Cr    