Exemple #1
0
    def users_search(self,name,page):
        #获得ID,全部写入
        result=api_xn.searchonRenren(name,page)
        #下面实现请求分页
        #self.SESSION_KEY=api_xn.get_session_key(username='******',password='******')
        #f = file("data/renren.txt","a")    
        
        id = self.read_id(page)
        if os.path.exists("data/renrenid"+str(page)+".txt"):
            os.remove("data/renrenid"+str(page)+".txt")
            pass

        count = 0 
        ren_sql = sql_renren.renren_sql()
        for i in range(len(id)):
            result=api_xn.users_getInfo(api_key=self.API_KEY,session_key=self.SESSION_KEY,uids=id[i])
            
            if result.find(u'error_code'.encode('utf8')) >= 0:
                print "error_code"
                continue
            if result == '[]':
                continue            
            result = self.format_data(id[i],json.loads(result))                
            while 1:
                try:
                    ren_sql.insert_value(result,"renren")
                    break
                except:
                    time.sleep(1)
                    
            count += 1
            #print count 
        #f.close()
        return result
Exemple #2
0
 def __init__(self, key, parent=None, title=Eng2Zh("iSeeu-Match")):
     wx.Frame.__init__(self, parent, -1, title=title, size=(800,590),style=wx.DEFAULT_FRAME_STYLE^(wx.MAXIMIZE_BOX|wx.RESIZE_BORDER))
     self.Center()
     self.Bind(wx.EVT_PAINT, self.OnPaint)
     self.SetIcon(wx.Icon('image/icon.ico', wx.BITMAP_TYPE_ICO))
     
     self.genderlist = wx.ComboBox(self, size=(100,-1))
     self.provincelist = wx.ComboBox(self, size=(100,-1))
     self.citylist = wx.ComboBox(self, size=(100,-1))
     self.source = wx.ComboBox(self, size=(100,-1))
     
     #------------------------------------------------------------------
     hbox = wx.BoxSizer()
     hbox.Add((10,15), 0, wx.ALL, 5)
     
     hbox2 = wx.BoxSizer()
     hbox2.Add((20,10), 0, wx.ALL, 5)
     hbox2.Add(self.genderlist, 0, wx.LEFT, 5)
     hbox2.Add((30,10), 0, wx.ALL, 5)
     hbox2.Add(self.provincelist, 0, wx.LEFT, 5)
     hbox2.Add((30,10), 0, wx.ALL, 5)
     hbox2.Add(self.citylist, 0, wx.LEFT, 5)     
     hbox2.Add((30,10), 0, wx.ALL, 5)
     hbox2.Add(self.source, 0, wx.LEFT, 5)     
     
     vbox = wx.BoxSizer(wx.VERTICAL)
     vbox.Add((800,200),0,wx.ALL,0)
     vbox.Add(hbox, 0, wx.ALL^wx.BOTTOM, 5)
     vbox.Add(hbox2, 0, wx.ALL^wx.BOTTOM, 5)
     
     self.namelist = wx.ListCtrl(self, style=wx.LC_REPORT| wx.LC_EDIT_LABELS| wx.LC_SORT_ASCENDING)
     self.namelist.InsertColumn(0,Eng2Zh("姓名"),wx.LIST_FORMAT_CENTER,width=100)
     self.namelist.InsertColumn(1,Eng2Zh("ID"),wx.LIST_FORMAT_CENTER,width=100)
     self.namelist.InsertColumn(2,Eng2Zh("性别"), wx.LIST_FORMAT_CENTER,width=100)
     self.namelist.InsertColumn(3,Eng2Zh("省"),wx.LIST_FORMAT_CENTER,width=100)
     self.namelist.InsertColumn(4,Eng2Zh("城市"),wx.LIST_FORMAT_CENTER,width=100)
     self.namelist.InsertColumn(5,Eng2Zh("来源"),wx.LIST_FORMAT_CENTER,width=100)
     
     vbox.Add(self.namelist, 1, wx.ALL|wx.EXPAND, 5)
     self.SetSizer(vbox)      
     
     #成员变量
     self.key = key 
     self.mysql=sqlite_op.sqlite_op()
     self.rensql = sql_renren.renren_sql()
     
     self.genderlist.Bind(wx.EVT_COMBOBOX,self.OnSexCha)
     self.provincelist.Bind(wx.EVT_COMBOBOX,self.OnSexCha)
     self.citylist.Bind(wx.EVT_COMBOBOX,self.OnSexCha)
     self.namelist.Bind(wx.EVT_LIST_ITEM_ACTIVATED,self.OnMoreInfo)
     self.source.Bind(wx.EVT_COMBOBOX, self.OnSexCha)
     
     self.timer = wx.Timer(self, 1)
     self.timer.Start(1)
     self.Bind(wx.EVT_TIMER, self.OnInitPage, self.timer)
    def __init__ (self):
        
        self.API_KEY='9c7c640dda6845669c44231b3761e962'#'b24be2445dd94ab0a99d917e6a88c993'
        self.SECRET_KEY='6375b763e5f2420a98f66342d4b0d00d'#'690dec5d66b6410cbbf3a9c40d972743'
        
        #初始化
        api_xn.init_info(api_key=self.API_KEY,secret_key=self.SECRET_KEY)

        self.ren_sql = sql_renren.renren_sql()
        self.ren_sql.create_table("renren")
        #self.bGetId = [False]

        self.SESSION_KEY=api_xn.get_session_key(username='******',password='******')
Exemple #4
0
def delete_all_sql():
    print "*** start clear sqlite3"
    sinasql=sqlite_op.sqlite_op()
    rensql = sql_renren.renren_sql()
    twsql = twitter.Twitter_Sql()
    fbsql = facebook.Facebook_Sql()
    try:
        sinasql.delete_all()
    except:
        print "sina,No table"
    try:
        twsql.clear_all()
        print "clear twitter sql"
    except Exception,e:
        print "twitter,No table",e
Exemple #5
0
 def RenrenGet(self):
     rensql = sql_renren.renren_sql()
     renindex = 0
     while(threading.currentThread().isAlive()):
         if self.isEnd:            
             break            
         try:
             #人人
             data = rensql.get_part_value(self.key, renindex)
             if(data==None or len(data)==0):
                 continue                    
             renindex += len(data)
             #print "renren write","data",len(data),Eng2Zh("第"),renindex   
             self.WriteData(data)
         except:
             time.sleep(0.1)
     print "renren exit write"
     while 1:
         try:
             data = rensql.get_part_value(self.key, renindex)
             self.WriteData(data)
             break
         except Exception,e:
             print "renren write error:",e
Exemple #6
0
    def __init__(self,parent,id,source, sid=None):    
        wx.Frame.__init__(self,parent,title=Eng2Zh("iSeeu详细信息"),size=(750,650),pos=(300,50), style=wx.DEFAULT_FRAME_STYLE^(wx.MAXIMIZE_BOX|wx.RESIZE_BORDER))
        self.SetBackgroundColour((250,250,250))
        self.SetIcon(wx.Icon('image/icon.ico', wx.BITMAP_TYPE_ICO))
        if source == "sina.com.cn":
            self.moreinfoLB = MoreInfo.iSeeuMoreLB(self) 
        elif source == "renren.com":
            self.moreinfoLB = MoreInfo.iSeeuMoreLB(self, 2)

        self.name=wx.StaticText(self,label=Eng2Zh("姓名:"))
        self.nameval=wx.StaticText(self)
        self.ID=wx.StaticText(self,label="I D:")
        self.idval=wx.StaticText(self)
        self.sex=wx.StaticText(self,label=Eng2Zh("性别:"))
        self.sexval=wx.StaticText(self)
        self.province=wx.StaticText(self,label=Eng2Zh("省份:"))
        self.provinceval=wx.StaticText(self)
        self.city=wx.StaticText(self,label=Eng2Zh("城市:"))
        self.cityval=wx.StaticText(self)
        self.domain = wx.StaticText(self,label=Eng2Zh("网站:"))
        self.domainval = wx.StaticText(self)
        
        #self.Bind(wx.EVT_CLOSE, self.__repr__, self)
        #不同
        if source == "sina.com.cn":
            self.description = wx.StaticText(self,label=Eng2Zh("描述:"))
            self.descriptionval = wx.StaticText(self)
            self.status = wx.StaticText(self,label=Eng2Zh("状态:"))
            self.statusval = wx.StaticText(self)
            self.regtime = wx.StaticText(self,label=Eng2Zh("注册于:"))
            self.regtimeval = wx.StaticText(self)
            
            self.friendcnt = 0
            
        elif source == "renren.com":
            self.birth = wx.StaticText(self,label=Eng2Zh("生    日:"))
            self.birthval = wx.StaticText(self)
            self.country = wx.StaticText(self,label=Eng2Zh("国    家:"))
            self.countryval = wx.StaticText(self)
            self.workplace = wx.StaticText(self,label=Eng2Zh("工作地点:"))
            self.workplaceval = wx.StaticText(self)            
            self.workdes = wx.StaticText(self,label=Eng2Zh("工作描述:"))
            self.workdesval = wx.StaticText(self)
            self.wstime = wx.StaticText(self,label=Eng2Zh("开始时间:"))
            self.wstimeval = wx.StaticText(self)
            self.wetime = wx.StaticText(self,label=Eng2Zh("结束时间:"))
            self.wetimeval = wx.StaticText(self)
            self.gsch = wx.StaticText(self,label=Eng2Zh("毕业学校:"))
            self.gschval = wx.StaticText(self)
            self.gtime = wx.StaticText(self,label=Eng2Zh("毕业时间:"))
            self.gtimeval = wx.StaticText(self)
        
        #获得数据
        if sid:
            #获取数据
            sinaapi = sina_sdk.myapi()
            sinaapi.search_user_byid(id)
        self.data = None
        #print "data",self.data
        if source == "sina.com.cn":
            self.sqlite_op=sqlite_op.sqlite_op()
            self.data=self.sqlite_op.searchById(id)
            self.data=self.data[0]
            
            self.domainval.SetLabel(self.data[6])
            des = self.data[7]
            if len(des)>41: des=des[:41]+"..."
            self.descriptionval.SetLabel(des)
            #print type(self.data[8]),self.data[8]
            sta = self.data[8]
            if sta==None:
                sta=' '
            else:
                if len(sta)>41: sta=sta[:41]+"..."                
            self.statusval.SetLabel(sta)
            self.regtimeval.SetLabel(self.data[9])
            self.friendcnt = self.data[10]
            
            self.nameval.SetLabel(self.data[0])
            self.idval.SetLabel(str(self.data[1]))
            self.sexval.SetLabel(self.data[2])            
            self.provinceval.SetLabel(self.data[3])
            self.cityval.SetLabel(self.data[4])
            self.domainval.SetLabel(Eng2Zh('新浪网')+'sina.com.cn')
            
        elif source == "renren.com":
            rensql = sql_renren.renren_sql()
            self.data = rensql.get_all_value(id)
            self.domainval.SetLabel(Eng2Zh('人人网')+'renren.com')
            self.nameval.SetLabel(self.data[1])
            self.idval.SetLabel(str(self.data[2]))
            self.sexval.SetLabel(self.data[3])
            
            self.birthval.SetLabel(self.data[4])
            
            self.countryval.SetLabel(self.data[6])
            self.provinceval.SetLabel(self.data[7])
            self.cityval.SetLabel(self.data[8])
            
            self.workplaceval.SetLabel(self.data[9])
            self.workdesval.SetLabel(self.data[10])
            self.wstimeval.SetLabel(self.data[11])
            self.wetimeval.SetLabel(self.data[12])
            self.gschval.SetLabel(self.data[13])
            self.gtimeval.SetLabel(self.data[14])
            
        #print "data",self.data
        
        
        
        img = wx.Image("image/python_kj.jpg",wx.BITMAP_TYPE_ANY)
        self.img=wx.StaticBitmap(self,-1,wx.BitmapFromImage(img))
        
        #---------------1 行----------------
        #---------------1 行 1 列-----------
        hbox1 = wx.BoxSizer()
        hbox1.Add(self.img, 0, wx.ALL, 5)
        
        #---------------1 行 2 列-----------
        if source == "sina.com.cn":
            box_all = wx.BoxSizer(wx.VERTICAL)
            hbox12=wx.FlexGridSizer(2,6,5,5)   #wx.BoxSizer()
        
            hbox12.AddMany([(self.name,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.nameval,0,wx.ALIGN_LEFT|wx.ALIGN_BOTTOM),
                        (self.ID,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.idval,0,wx.ALIGN_LEFT|wx.ALIGN_BOTTOM),
                        (self.sex,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.sexval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                        (self.province,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.provinceval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                        (self.city,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.cityval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                        (self.domain,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.domainval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT)
                        ])
        
        
            box_cd = wx.BoxSizer()
            box_cd.AddMany([(self.description,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.descriptionval,1,wx.ALIGN_LEFT|wx.ALIGN_RIGHT|wx.EXPAND,5)])
            box_cs = wx.BoxSizer()
            box_cs.AddMany([(self.status,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.statusval,1,wx.ALIGN_LEFT|wx.ALIGN_RIGHT|wx.EXPAND,5)])
            box_cr = wx.BoxSizer()
            box_cr.AddMany([(self.regtime,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.regtimeval,1,wx.ALIGN_LEFT|wx.ALIGN_RIGHT|wx.EXPAND,5)])

            box_all.AddMany([(hbox12,0,(wx.ALL^wx.TOP)|wx.EXPAND,5),(box_cd,0,wx.ALL|wx.EXPAND,5),
                            (box_cs,0,wx.ALL|wx.EXPAND,5),(box_cr,0,wx.ALL|wx.EXPAND,5)])
                            
            hbox1.Add(box_all, 0, wx.EXPAND | wx.ALL,5)
        elif source == "renren.com":
            hbox12=wx.FlexGridSizer(5,6,5,5)
            hbox12.AddMany([(self.name,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.nameval,0,wx.ALIGN_LEFT|wx.ALIGN_BOTTOM),
                            (self.ID,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.idval,0,wx.ALIGN_LEFT|wx.ALIGN_BOTTOM),
                            (self.sex,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.sexval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            
                            (self.country,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.countryval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.province,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.provinceval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.city,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.cityval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            
                            (self.birth,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.birthval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.domain,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.domainval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.workdes,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.workdesval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            
                            (self.workplace,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.workplaceval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.wstime,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.wstimeval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.wetime,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.wetimeval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            
                            (self.gsch,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.gschval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            (self.gtime,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),(self.gtimeval,0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),
                            ((1,1),0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT),((1,1),0,wx.ALIGN_BOTTOM|wx.ALIGN_LEFT)                          
                            
                            ])
            hbox1.Add(hbox12, 0, wx.EXPAND | wx.ALL,5)
        #---------------2 行----------------
        vbox=wx.BoxSizer(wx.VERTICAL)
        vbox.Add(hbox1,proportion=0,flag=wx.ALL|wx.EXPAND,border=5)
        vbox.Add(self.moreinfoLB,proportion=1,flag=wx.EXPAND | wx.ALL,border=0)
        self.SetSizer(vbox)
        
        self.sid = sid
        self.id = id
        self.sur = source
        self.timer = wx.Timer(self,10)
        self.timer.Start(1)
        self.Bind(wx.EVT_TIMER,self.GetImage)
        
        self.Show()
Exemple #7
0
    def __init__(self, parent, id, source, sid=None):
        wx.Frame.__init__(self,
                          parent,
                          title=Eng2Zh("iSeeu详细信息"),
                          size=(750, 650),
                          pos=(300, 50),
                          style=wx.DEFAULT_FRAME_STYLE ^
                          (wx.MAXIMIZE_BOX | wx.RESIZE_BORDER))
        self.SetBackgroundColour((250, 250, 250))
        self.SetIcon(wx.Icon('image/icon.ico', wx.BITMAP_TYPE_ICO))
        if source == "sina.com.cn":
            self.moreinfoLB = MoreInfo.iSeeuMoreLB(self)
        elif source == "renren.com":
            self.moreinfoLB = MoreInfo.iSeeuMoreLB(self, 2)

        self.name = wx.StaticText(self, label=Eng2Zh("姓名:"))
        self.nameval = wx.StaticText(self)
        self.ID = wx.StaticText(self, label="I D:")
        self.idval = wx.StaticText(self)
        self.sex = wx.StaticText(self, label=Eng2Zh("性别:"))
        self.sexval = wx.StaticText(self)
        self.province = wx.StaticText(self, label=Eng2Zh("省份:"))
        self.provinceval = wx.StaticText(self)
        self.city = wx.StaticText(self, label=Eng2Zh("城市:"))
        self.cityval = wx.StaticText(self)
        self.domain = wx.StaticText(self, label=Eng2Zh("网站:"))
        self.domainval = wx.StaticText(self)

        #self.Bind(wx.EVT_CLOSE, self.__repr__, self)
        #不同
        if source == "sina.com.cn":
            self.description = wx.StaticText(self, label=Eng2Zh("描述:"))
            self.descriptionval = wx.StaticText(self)
            self.status = wx.StaticText(self, label=Eng2Zh("状态:"))
            self.statusval = wx.StaticText(self)
            self.regtime = wx.StaticText(self, label=Eng2Zh("注册于:"))
            self.regtimeval = wx.StaticText(self)

            self.friendcnt = 0

        elif source == "renren.com":
            self.birth = wx.StaticText(self, label=Eng2Zh("生    日:"))
            self.birthval = wx.StaticText(self)
            self.country = wx.StaticText(self, label=Eng2Zh("国    家:"))
            self.countryval = wx.StaticText(self)
            self.workplace = wx.StaticText(self, label=Eng2Zh("工作地点:"))
            self.workplaceval = wx.StaticText(self)
            self.workdes = wx.StaticText(self, label=Eng2Zh("工作描述:"))
            self.workdesval = wx.StaticText(self)
            self.wstime = wx.StaticText(self, label=Eng2Zh("开始时间:"))
            self.wstimeval = wx.StaticText(self)
            self.wetime = wx.StaticText(self, label=Eng2Zh("结束时间:"))
            self.wetimeval = wx.StaticText(self)
            self.gsch = wx.StaticText(self, label=Eng2Zh("毕业学校:"))
            self.gschval = wx.StaticText(self)
            self.gtime = wx.StaticText(self, label=Eng2Zh("毕业时间:"))
            self.gtimeval = wx.StaticText(self)

        #获得数据
        if sid:
            #获取数据
            sinaapi = sina_sdk.myapi()
            sinaapi.search_user_byid(id)
        self.data = None
        #print "data",self.data
        if source == "sina.com.cn":
            self.sqlite_op = sqlite_op.sqlite_op()
            self.data = self.sqlite_op.searchById(id)
            self.data = self.data[0]

            self.domainval.SetLabel(self.data[6])
            des = self.data[7]
            if len(des) > 41: des = des[:41] + "..."
            self.descriptionval.SetLabel(des)
            #print type(self.data[8]),self.data[8]
            sta = self.data[8]
            if sta == None:
                sta = ' '
            else:
                if len(sta) > 41: sta = sta[:41] + "..."
            self.statusval.SetLabel(sta)
            self.regtimeval.SetLabel(self.data[9])
            self.friendcnt = self.data[10]

            self.nameval.SetLabel(self.data[0])
            self.idval.SetLabel(str(self.data[1]))
            self.sexval.SetLabel(self.data[2])
            self.provinceval.SetLabel(self.data[3])
            self.cityval.SetLabel(self.data[4])
            self.domainval.SetLabel(Eng2Zh('新浪网') + 'sina.com.cn')

        elif source == "renren.com":
            rensql = sql_renren.renren_sql()
            self.data = rensql.get_all_value(id)
            self.domainval.SetLabel(Eng2Zh('人人网') + 'renren.com')
            self.nameval.SetLabel(self.data[1])
            self.idval.SetLabel(str(self.data[2]))
            self.sexval.SetLabel(self.data[3])

            self.birthval.SetLabel(self.data[4])

            self.countryval.SetLabel(self.data[6])
            self.provinceval.SetLabel(self.data[7])
            self.cityval.SetLabel(self.data[8])

            self.workplaceval.SetLabel(self.data[9])
            self.workdesval.SetLabel(self.data[10])
            self.wstimeval.SetLabel(self.data[11])
            self.wetimeval.SetLabel(self.data[12])
            self.gschval.SetLabel(self.data[13])
            self.gtimeval.SetLabel(self.data[14])

        #print "data",self.data

        img = wx.Image("image/python_kj.jpg", wx.BITMAP_TYPE_ANY)
        self.img = wx.StaticBitmap(self, -1, wx.BitmapFromImage(img))

        #---------------1 行----------------
        #---------------1 行 1 列-----------
        hbox1 = wx.BoxSizer()
        hbox1.Add(self.img, 0, wx.ALL, 5)

        #---------------1 行 2 列-----------
        if source == "sina.com.cn":
            box_all = wx.BoxSizer(wx.VERTICAL)
            hbox12 = wx.FlexGridSizer(2, 6, 5, 5)  #wx.BoxSizer()

            hbox12.AddMany([
                (self.name, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.nameval, 0, wx.ALIGN_LEFT | wx.ALIGN_BOTTOM),
                (self.ID, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.idval, 0, wx.ALIGN_LEFT | wx.ALIGN_BOTTOM),
                (self.sex, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.sexval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.province, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.provinceval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.city, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.cityval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.domain, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.domainval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT)
            ])

            box_cd = wx.BoxSizer()
            box_cd.AddMany([(self.description, 0,
                             wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                            (self.descriptionval, 1,
                             wx.ALIGN_LEFT | wx.ALIGN_RIGHT | wx.EXPAND, 5)])
            box_cs = wx.BoxSizer()
            box_cs.AddMany([(self.status, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                            (self.statusval, 1,
                             wx.ALIGN_LEFT | wx.ALIGN_RIGHT | wx.EXPAND, 5)])
            box_cr = wx.BoxSizer()
            box_cr.AddMany([(self.regtime, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                            (self.regtimeval, 1,
                             wx.ALIGN_LEFT | wx.ALIGN_RIGHT | wx.EXPAND, 5)])

            box_all.AddMany([(hbox12, 0, (wx.ALL ^ wx.TOP) | wx.EXPAND, 5),
                             (box_cd, 0, wx.ALL | wx.EXPAND, 5),
                             (box_cs, 0, wx.ALL | wx.EXPAND, 5),
                             (box_cr, 0, wx.ALL | wx.EXPAND, 5)])

            hbox1.Add(box_all, 0, wx.EXPAND | wx.ALL, 5)
        elif source == "renren.com":
            hbox12 = wx.FlexGridSizer(5, 6, 5, 5)
            hbox12.AddMany([
                (self.name, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.nameval, 0, wx.ALIGN_LEFT | wx.ALIGN_BOTTOM),
                (self.ID, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.idval, 0, wx.ALIGN_LEFT | wx.ALIGN_BOTTOM),
                (self.sex, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.sexval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.country, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.countryval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.province, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.provinceval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.city, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.cityval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.birth, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.birthval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.domain, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.domainval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.workdes, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.workdesval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.workplace, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.workplaceval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.wstime, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.wstimeval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.wetime, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.wetimeval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.gsch, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.gschval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.gtime, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                (self.gtimeval, 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                ((1, 1), 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT),
                ((1, 1), 0, wx.ALIGN_BOTTOM | wx.ALIGN_LEFT)
            ])
            hbox1.Add(hbox12, 0, wx.EXPAND | wx.ALL, 5)
        #---------------2 行----------------
        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(hbox1, proportion=0, flag=wx.ALL | wx.EXPAND, border=5)
        vbox.Add(self.moreinfoLB,
                 proportion=1,
                 flag=wx.EXPAND | wx.ALL,
                 border=0)
        self.SetSizer(vbox)

        self.sid = sid
        self.id = id
        self.sur = source
        self.timer = wx.Timer(self, 10)
        self.timer.Start(1)
        self.Bind(wx.EVT_TIMER, self.GetImage)

        self.Show()