changeset 231:c0b9604b0be9

the currect version of last bug fix
author kevin@tombear.tombears.com
date Wed, 05 Nov 2008 03:08:16 +0800
parents 2d65c786084e
children 978a949602e5 afd3f5cb8597 a89e049d1d31
files pyikriam/createAccount.py
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pyikriam/createAccount.py	Wed Nov 05 01:10:48 2008 +0800
+++ b/pyikriam/createAccount.py	Wed Nov 05 03:08:16 2008 +0800
@@ -10,6 +10,9 @@
     def __init__(self,account,password,server):
         self.account=account
         self.password=password
+        if len(self.password)<8:
+            print 'Password size mast bigger then 8 chars'
+            pass
         self.server=server
         headers=[('Referer','http://'+self.server[self.server.find('.')+1:]+'/register.php')]
         self.browser = fake_moz(headers)
@@ -24,7 +27,6 @@
         "email":self.account+"@ossug.org",\
         "password":self.password,\
         "agb":"on"}
-        print 'debug 10'
         self.ret=c(self.baseurl+'/index.php?action=newPlayer').get(params).get_content()
         print "Waiting for 30 seconds to get confirme..."
         time.sleep(30)
@@ -47,8 +49,8 @@
         for thread in folder:
             #thread.id, len(thread), thread.subject
             account=string.split(thread.subject)[0]
-            print account,
-            if account==self.account:
+            acsize=len(self.account)
+            if account[-acsize:]==self.account:
                 print "find "+account
                 for msg in thread:
                     mmsg=email.message_from_string(msg.source)
@@ -56,8 +58,8 @@
                     for x in string.split(confcontext):
                         if x[0:7]=='http://':
                             confurl=x
-                            print "got confirme url..."
                             break
+        print "send confirme."
         self.ret=c(confurl).get().get_content()
         pass
 
@@ -68,6 +70,6 @@
         <input class="button" value="" type="submit">
         """
 
-ikariamca=CreateAccount('laswnny','wtaaa123','s4.ikariam.tw')
+ikariamca=CreateAccount('jdanny','taaaa123','s4.ikariam.tw')
 a=ikariamca.ca()