I'm trying to find out if there is a way programmatically (using web3) to check if a token takes a fee on transfer, such as the ones that require the swapExactETHForTokensSupportingFeeOnTransferTokens function on the Uniswap router.

Is it possible to discover this information without having to call the Uniswap swapExactETHForTokens function and subsequently checking for the infamous "UniswapV2: K" errors?