I'm trying to swap tokens with web3py using the swapExactETHForTokensSupportingFeeOnTransferTokens function, with some tokens it works perfectly, in others I get the error "execution reverted: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT" I'm informing the parameter "amountOutMin (uint256)" to control the slippage . that I saw differently in the tokens that work and what do not work is the path of the contracts used for the swap.
On the poocoin website when I make a trade and the contract path is "WBNB > TOKEN", that is, from BNB direct to TOKEN, it also works using the "swapExactETHForTokensSupportingFeeOnTransferTokens" function when there is some other contract in the middle like "WBNB > WUSD > TOKEN" doesn't work, and these paths change to the same token, see images below:
How poocoin identifies which contracts to use to swap BNB to TOKEN? how to identify the contacts that I should use in the parameter "path (address[])"
swapExactETHForTokensSupportingFeeOnTransferTokens(
amountOutMin,
[WBNB, ????, ???? TOKEN_BUY], # path (address[])
sender_address,
(int(time.time()) + 10000)