Advertisement
Thelorgoreng

Profile code

Aug 1st, 2015
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.84 KB | None | 0 0
  1. #### Profile
  2.       elif cmd == "prof" or cmd == "profile" or cmd == "Prof" or cmd == "Profile":
  3.         try:
  4.           args=args.lower()
  5.           stuff=str(urlreq.urlopen("http://"+args+".chatango.com").read().decode("utf-8"))
  6.           crap, age = stuff.split('<span class="profile_text"><strong>Age:</strong></span></td><td><span class="profile_text">', 1)
  7.           age, crap = age.split('<br /></span>', 1)
  8.           crap, gender = stuff.split('<span class="profile_text"><strong>Gender:</strong></span></td><td><span class="profile_text">', 1)
  9.           gender, crap = gender.split(' <br /></span>', 1)
  10.           if gender == 'M':
  11.               gender = 'Male'
  12.           elif gender == 'F':
  13.               gender = 'Female'
  14.           else:
  15.               gender = '?'
  16.           crap, location = stuff.split('<span class="profile_text"><strong>Location:</strong></span></td><td><span class="profile_text">', 1)
  17.           location, crap = location.split(' <br /></span>', 1)
  18.           crap,mini=stuff.split("<span class=\"profile_text\"><!-- google_ad_section_start -->",1)
  19.           mini,crap=mini.split("<!-- google_ad_section_end --></span>",1)
  20.           mini=mini.replace("<img","<!")
  21.           picture = '<a href="http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg" style="z-index:59" target="_blank">http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg</a>'
  22.           prodata = '<br/> <a href="http://chatango.com/fullpix?' + args + '" target="_blank">' + picture + '<br/><br/> Age: '+ age + ' <br/> Gender: ' + gender +  ' <br/> Location: ' +  location + '' '<br/> <a href="http://' + args + '.chatango.com" target="_blank"><u>Chat With User</u></a> ' "<br/><br/> "+ mini
  23.           room.message(prodata,True)
  24.         except:
  25.           room.message(""+args+" doesn't exist o.o ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement