
    Dg                     r    d dl Z d dlZej        dk    rd dlmZ nd dlZd dlmZ e	fZ
d Zd dlmZ d dlmZ dS )    N)   
   )loggerc                  J   g d }} 	 t          j        d                              d                                          }|                                D ])}|                     t          j        |                     *| }n# t          $ r}g } t          j
        d|           	 ddlm} t           |dd                    5 }|                                }|                                D ])}|                     t          j        |                     *	 d d d            n# 1 swxY w Y   | }n/# t          $ r"}g } t          j
        d	|           Y d }~nd }~ww xY wY d }~nd }~ww xY w|st          d
|          t!          |t"                    st          d|          |S )Nzfake_useragent.datazbrowsers.jsonzuUnable to find local data/json file or could not parse the contents using importlib-resources. Try pkg-resource next.)exc_infor   )resource_filenamefake_useragentzdata/browsers.jsonzWCould not find local data/json file or could not parse the contents using pkg-resource.zData list is emptyzData is not a list )ilrfilesjoinpath	read_text
splitlinesappendjsonloads	Exceptionr   warningpkg_resourcesr   openreadFakeUserAgentError
isinstancelist)dataret
json_lineslineexcr   fileexc2s           I/var/www/sysmax/venv/lib/python3.11/site-packages/fake_useragent/utils.pyloadr"      sK   D#DI+,,55oFFPPRR 	 ))++ 	* 	*DKK
4(())))    D	
 	
 	
 	
	777777!!"24HII  2!YY[[
&1133 2 2DKK
4 0 011112	2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 CC 	 	 	DNi        	#2  < !5s;;;c4   = !6<<<Jsg   A9B   
E)
E$#D0AD"D0"D&	&D0)D&	*D0/E$0
E:EE$EE$$E))settings)r   )r   sysversion_infoimportlib.resources	resourcesr
   importlib_resourcesfake_useragent.logr   str	str_typesr"   r	   r#   fake_useragent.errorsr        r!   <module>r/      s     



 w%%%%%%%%%%% % % % % % %F	
' ' 'T $ # # # # # 4 4 4 4 4 4 4 4r.   