diff --git a/src/caoscrawler/converters/converters.py b/src/caoscrawler/converters/converters.py index 3a3c7e292a2967cab68228e820fea6880302be89..bb069e5d44c77dda6aba15020064a7622dc8efd8 100644 --- a/src/caoscrawler/converters/converters.py +++ b/src/caoscrawler/converters/converters.py @@ -575,10 +575,17 @@ class Converter(object, metaclass=ABCMeta): " one element with they key being the name" " of the function!") tr_func_key = list(tr_func_el.keys())[0] - tr_func_params = tr_func_el[tr_func_key] + + # Create a copy of the function parameters: + tr_func_params = dict(tr_func_el[tr_func_key]) + if tr_func_key not in transformer_functions: raise RuntimeError("Unknown transformer function: {}".format(tr_func_key)) + # Do variable replacment on function parameters: + for key in tr_func_params: + tr_func_params[key] = replace_variables(tr_func_params[key]) + # Retrieve the function from the dictionary: tr_func = transformer_functions[tr_func_key] # Call the function: