On 12月3日, 上午3时26分, "Jerry Hill" <[EMAIL PROTECTED]> wrote:
> On Tue, Dec 2, 2008 at 2:08 PM, <[EMAIL PROTECTED]> wrote:
> print base64.__file__
> > /usr/lib/python2.5/base64.pyc
>
> That looks fine, and matches what I have on my linux box. Your code
> works fine for me when I run it, so I'm o
On 12月3日, 上午1时50分, "Jerry Hill" <[EMAIL PROTECTED]> wrote:
> 2008/12/2 <[EMAIL PROTECTED]>:
>
> > it's run ,Eric gave me error,the error is "'module'objecthasno
> >attribute'decodestring'",
>
> Do you have your own base64.py (or base64.pyc) that's shadowing the
> standardmodulebase64? Try this:
>
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.encodestr
this string from web by the Regular Expression,
−−−
href="#" onClick="ConvertURL2FG('Flashget://
W0ZMQVNIR0VUXWh0dHA6Ly9tb3YuM2dwLmNuL2d1aWxpbi8yMDA4LzExLzExL3l1ZWhvdWppZmVuMDIuM2dwW0ZMQVNIR0VUXQ==&233','',
233)" oncontextmenu="Flashget_SetHref(this)" fg="Fla
my code
---
# -*- coding: utf8 -*-
#!/usr/bin/python
import urllib
import urllib2
import re
import MySQLdb
conn=MySQLdb.connect
(host="localhost",user="root",passwd="ylj",db="net", charset="utf8")
cur = conn.c