def man_show_api(man_id): man = Zsite.mc_get(man_id) if man: comp, title = career_current(man_id) txt = txt_get(man_id) link = man.link li = [ ('id', man_id), ('name', man.name), ('uid', url_by_id(man_id)), ('company', comp), ('title', title), ('signature', motto_get(man_id)), ('about_me', txt), ('ico', pic_url(man_id, 219)), ('link', name_link_by_zsite_id(man_id, 'http:')), ('appearance_fee', 42), ] return dict(filter(lambda x: bool(x[1]), li)) return {}
def man_show_api(man_id): man = Zsite.mc_get(man_id) if man: comp, title = career_current(man_id) txt = txt_get(man_id) link = man.link li = [ ('id', man_id), ('name', man.name), ('uid', url_by_id(man_id)), ('company', comp), ('title', title), ('signature', motto_get(man_id)), ('about_me', txt), ('ico', pic_url(man_id, 219)), ('link', name_link_by_zsite_id(man_id, 'http:')), ('appearance_fee', 42), ] return dict(filter(lambda x:bool(x[1]), li)) return {}
line = line.decode('gb18030') t = line.split(',') if len(t) != 6: print line else: uid = t[0].split(' ', 1)[0] u = PoMetaUser.mc_get(uid) link = t[4] zsite = None if link: id = zsite_by_query(link) zsite = Zsite.mc_get(id) else: email = t[5].strip() if email: zsite = user_by_mail(email) if zsite: user_id = zsite.id if not pic_url(user_id): # print count , zsite.id print zsite.name, 'http:' + zsite.link print u.name, u.link # print t[-3] # count += 1 print '' #u.user_id = zsite.id #u.save()
print line else: uid = t[0].split(' ', 1)[0] u = PoMetaUser.mc_get(uid) link = t[4] zsite = None if link: id = zsite_by_query(link) zsite = Zsite.mc_get(id) else: email = t[5].strip() if email: zsite = user_by_mail(email) if zsite: user_id = zsite.id if not pic_url(user_id): # print count , zsite.id print zsite.name, 'http:'+zsite.link print u.name , u.link # print t[-3] # count += 1 print '' #u.user_id = zsite.id #u.save()