def pvpc_data_dia(str_dia, str_dia_fin=None):
params = {'<STR_LIT>': DATE_FMT, '<STR_LIT>': False,<EOL>'<STR_LIT>': pvpc_procesa_datos_dia, '<STR_LIT>': pvpc_url_dia,<EOL>'<STR_LIT>': {'<STR_LIT>': True, '<STR_LIT>': HEADERS}}<EOL>if str_dia_fin is not None:<EOL><INDENT>params['<STR_LIT>'] = True<EOL>data, hay_errores, str_import = get_data_en_intervalo(str_dia, str_dia_fin, **params)<EOL><DEDENT>else:<EOL><INDENT>data, hay_errores, str_import = get_data_en_intervalo(str_dia, str_dia, **params)<EOL><DEDENT>if not hay_errores:<EOL><INDENT>return data<EOL><DEDENT>else:<EOL><INDENT>return str_import<EOL><DEDENT>
Obtiene datos de PVPC en un día concreto o un intervalo, accediendo directamente a la web.