I’m new to python and have a question about decoding base64 encoded urls:
import base64
url64="aHR0cDovLzR1ZnJlZS50ay9tZWRpYTcyMzY0Ni9mdWVuZi8wMzYubXAzA"
finalUrl=base64.b64decode(url64)
Won’t work! TypeError: Incorrect padding
I’ve also tried to add the needed padding:
import base64
url64="aHR0cDovLzR1ZnJlZS50ay9tZWRpYTcyMzY0Ni9mdWVuZi8wMzYubXAzA"
finalUrl=base64.b64decode(url64 + '=' * (4 - len(url64) % 4))
but im still getting TypeError: Incorrect padding
Would be great if someone knows a solution for this.
It would appear that the final
Ais superfluous: