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 A
is superfluous:
In [4]: base64.b64decode('aHR0cDovLzR1ZnJlZS50ay9tZWRpYTcyMzY0Ni9mdWVuZi8wMzYubXAz')
Out[4]: 'http://4ufree.tk/media723646/fuenf/036.mp3'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With