
    b	h              
          d dl Z d dlZd dlZdZdddddddd	d
d	ddddddddddddddddZd Zedk    r ed            e            Z ed           e	                                D ]=Z
 ede
 d           e                    e
          D ]\  ZZ ede de            > ed            	 e                    d!d"          Z ed#e            e                    d!d$          Z ed%e            e                    d&d'          Z ed(e            e                    d)d*          Z ed+e            e                    d)d,          Z ed-e            e                    d)d.          Z ed/e            e                    d0d1          Z ed2e            e                    d0d3          Z ed4e            dS # e j        e j        ef$ rZ ed5e            Y dZ[dS dZ[ww xY wdS )6    Nz
config.ini3605330601800z60.0z10.0)	download_wait_timeoutfailure_wait_secondsdownload_stability_intervaldownload_stability_checksdirect_download_timeoutdirect_idle_timeoutdirect_total_timeoutdirect_wait_timeoutselenium_wait_timeoutfalse904515)headlesspage_load_timeoutnavigation_waitpixeldrain_button_waitmega_button_waitmediafire_button_waitzsMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36z0.1INFO)
user_agentitem_processing_delay
debug_mode	log_level2)max_direct_downloadsmax_selenium_workers)TimeoutsSeleniumMiscParallelc            
      b   t          j        d          } |                     t                     t          j                            t                    r	 |                     t          d          }|rt          dt           d           n$t          dt           dt          j        	           n$# t           j        $ r1}t          d
t           d| dt          j        	           Y d}~nd}~ww xY wt          dt           d           	 t          j        d          }|                    t                     t          t          dd          5 }|                    |           ddd           n# 1 swxY w Y   t          dt                      n=# t          $ r0}t          dt           d| t          j        	           Y d}~nd}~ww xY wd}t                                          D ]\  }}|                     |          s6t          d| dt          j        	           |                     |           d}|                                D ]X\  }}	|                     ||          s=t          d| d| d|	 t          j        	           |                     |||	           d}Y| S )z>Loads configuration from config.ini, falling back to defaults.N)interpolationzutf-8)encodingz'Configuration loaded successfully from .zWarning: Could not read 'z2'. File might be empty or invalid. Using defaults.)filez#Warning: Error reading config file z: z9. Using default configuration for missing/invalid values.zConfiguration file z( not found. Using default configuration.wz$Created default configuration file: z-Warning: Could not write default config file FzWarning: Section '[z&]' was missing. Added default section.TzWarning: Option 'z' missing in '[z]'. Using default: )configparserConfigParser	read_dictDEFAULT_CONFIGospathexistsCONFIG_FILEreadprintsysstderrErroropenwriteIOErroritemshas_sectionadd_section
has_optionset)
config
files_readedefault_writer
configfileneeds_updatesectionoptionskeydefault_values
             8c:\Users\brownies\Downloads\rentrytest\config_manager.pyload_configrN   ,   s   &T:::F ^$$$ 
w~~k""  	[7CCJ NNNNOOOOoooo    ! 	 	 	 Bk  B  BQ  B  B  BZ        	 	W+WWW	
 	
 	
	)6TJJJN$$^444k3999 1Z$$Z0001 1 1 1 1 1 1 1 1 1 1 1 1 1 1FFFGGGG 	 	 	RRRqRRZ        	 L*0022 $ $!!'** 	 UgUUUZ    w'''L")--// 		$ 		$C$$Wc22 $gggGggXegg    

S-    $		$2 MsV   AB2 2C2'C--C2AF E6*F 6E::F =E:>F 
G#&GG__main__zLoading configuration...z
Loaded Configuration:[]z  z = z(
Example of retrieving converted values:r$   r	   z"  download_wait_timeout (as int): r   z&  direct_download_timeout (as float): r%   r   z  headless (as boolean): r&   r   z$  item_processing_delay (as float): r   z  debug_mode (as boolean): r    z  log_level (as string): r'   r"   z!  max_direct_downloads (as int): r#   z!  max_selenium_workers (as int): z)
Error retrieving specific config value: )r.   r2   r8   r5   r1   rN   __name__r7   rC   sectionsrI   r>   rK   valuegetinttimeoutgetfloatdirect_timeout
getbooleanr   delaydebuggetr    
max_directmax_seleniumNoSectionErrorNoOptionError
ValueErrorrE        rM   <module>rd      sY       				 



 "' #'*%(#'# &%!'  !"& !%  L!&	  !$ # ;! !HQ Q Qj z	E
$%%%[]]F	E
#$$$??$$ ( (n'nnn ,,w// 	( 	(JCE&s&&u&&''''	( 
E
5666@--
,CDD<7<<===5NOOG~GGHHH$$Z<<4(44555(?@@<U<<===!!&,773E33444JJv{33	5)55666 ]]:/EFF
>*>>???}}Z1GHH@,@@AAAAA')CZP @ @ @>1>>?????????@A s   7D G H+G??H