The Napoly integral for the wake potential calculations in the axisymmetric structure is a very useful method because the integration of E. field can be confined in a finite length instead of the infinite length by deforming the integration path, which reduces CPU time for the accurate calculations. However, his original method could not be applied to the transverse wake potentials in a structure where the two beam tubes on both sides have unequal radii. In this case, the integration path needs to be a straight line and the integration stretches out to an infinite in principle. We generalize the Napoly integrals so that integrals are always confined in a finite length even when the two beam tubes have unequal radii, for both longitudinal and transverse wake potential calculations. rMe extended method has been successfully implemented to ABCI code.