File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -469,10 +469,13 @@ async def handle_crawl_request(
469469 # await crawler.start()
470470
471471 base_config = config ["crawler" ]["base_config" ]
472- # Iterate on key-value pairs in global_config then use haseattr to set them
472+ # Iterate on key-value pairs in global_config then use hasattr to set them
473473 for key , value in base_config .items ():
474474 if hasattr (crawler_config , key ):
475- setattr (crawler_config , key , value )
475+ current_value = getattr (crawler_config , key )
476+ # Only set base config if user didn't provide a value
477+ if current_value is None or current_value == "" :
478+ setattr (crawler_config , key , value )
476479
477480 results = []
478481 func = getattr (crawler , "arun" if len (urls ) == 1 else "arun_many" )
You can’t perform that action at this time.
0 commit comments