
    YjS                         d dl mZmZmZ d dlmZ  ee      Zej                  d      d        Z	ej                  d      d        Z
edk(  rej                  dd	d
       yy)    )Flaskrequestjsonify)extractz/extractc                     t         j                  j                  d      xs dj                         } | st	        ddd g d      dfS 	 t        |       }t	        |      S # t        $ r%}t	        dt        |      d g d      dfcY d }~S d }~ww xY w)Nurl Fzurl is required)okerrorbestresultsi  i  )r   argsgetstripr   r   	Exceptionstr)r   resultexcs      &/var/www/html/Extract/extractor_api.pyextract_router      s    <<E"(b
/
/
1C&	
 
  	
v X	
 
  	s   A 	B&B BBz/healthc                      t        ddd      S )NTzALRAQI Extractor)r
   service)r        r   healthr       s    %  r   __main__z	127.0.0.1i$  T)hostportthreadedN)flaskr   r   r   	extractorr   __name__appr   r   r   runr   r   r   <module>r%      sz    ) ) Ho  0   zGG   r   