help me~!about base64
ylj798 at gmail.com
ylj798 at gmail.com
Tue Dec 2 11:48:16 EST 2008
my code:
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
import base64
def deflashget(st):
if st.startswith('Flashget://'):
return base64.decodestring(st[len('Flashget://'):])[10:-10]
elif st.startswith('http://') or st.startswith('ftp://'):
return 'Flashget://' + base64.encodestring('[FLASHGET]' + st
+'[FLASHGET]').replace('\n', '')
st='Flashget://
W0ZMQVNIR0VUXWh0dHA6Ly9kb3duLnJub3ZlbC5jb20vYm9va3R4dC8zLzEzNjgyLzEzNjgyLnppcFtGTEFTSEdFVF0=&1064'
print deflashget(st)
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
it's run ,Eric gave me error,the error is "'module' object has no
attribute 'decodestring'",
what can I do? who can help me?
More information about the Python-list
mailing list