
    <OOf                     x    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 y)    N)   
   )loggerc                     g d }} 	 t        j                  d      j                  d      j                         }|j	                         D ]&  }| j                  t        j                  |             ( | }|st        d
|      t!        |t"              st        d|      |S # t        $ r}g } t        j                  d|       	 ddlm} t         |dd            5 }|j                         }|j	                         D ]&  }| j                  t        j                  |             ( 	 d d d        n# 1 sw Y   nxY w| }n/# t        $ r#}g } t        j                  d	|       Y d }~nd }~ww xY wY d }~d }~ww xY w)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           U/var/www/premiumrankchecker/venv/lib/python3.12/site-packages/fake_useragent/utils.pyloadr"      se   D#DII+,55oFPPR 	 ))+ 	*DKK

4()	*4  !5s;;c4  !6<<J=   D	
	7!"24HI 2!YY[
&113 2DKK

4 012	2 2 2 C 	DNNi 	#s[   A-B 	E6(E1D=A
D.%	D=.D7	3	D=<E1=	E)E$E1$E))E11E6)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/      s9     
 w%% %F	
'T $ 4r.   