예제 #1
0
 def setUpClass(cls):
     cls.u1 = pyokc.User(USERNAME1, PASSWORD1)
     cls.u2 = pyokc.User(USERNAME2, PASSWORD2)
예제 #2
0
파일: profile.py 프로젝트: zenweasel/pyokc
'''
Sample script that visits a random profile from the quickmatch page,
and prints out most of the information in the profile.
'''

from pyokc import pyokc

u = pyokc.User()
p = u.quickmatch()  # p is an instance of the Profile class
u.visit(p)
p.update_traits()  # only necessary for if you want to fill in p.traits

print('Profile of {0}'.format(p.name))
print('{0}: {1}'.format('Gender', p.gender))
print('{0}: {1}'.format('Age', p.age))
print('{0}: {1}'.format('Orientation', p.orientation))
print('{0}: {1}'.format('Location', p.location))
print('{0}: {1}%'.format('Match', p.match))
print('{0}: {1}%'.format('Enemy', p.enemy))
print('----------')
print('')

print('Traits')
print('----------')
for trait in p.traits:
    print(trait)
print('')

print('Essays')
print('----------')
for title, essay in p.essays.items():