Browse files

fix a bug in get_user

  • Loading branch information...
1 parent 54265ee commit 4a9ad2887c7c2ed8248c1130daf4bd3d9bb8ecd8 @sunuslee committed Nov 15, 2011
Showing with 29 additions and 17 deletions.
  1. BIN .do_ci.swp
  2. +7 −0 api_limit
  3. +1 −1 argchk.py
  4. +1 −1 cache.py
  5. +1 −1 client.py
  6. +1 −1 dl.py
  7. +1 −1 do_2people
  8. +4 −4 do_ci
  9. +1 −1 do_ci_test.py
  10. +1 −1 fin_temp
  11. +1 −1 get_2poauth
  12. +1 −1 get_oauth
  13. +1 −1 no_oauth_adduser.py
  14. +1 −1 run_forever.py
  15. +4 −0 run_log
  16. +1 −1 sendstatus.py
  17. +1 −1 test_forever.py
  18. +1 −0 wait_queue
View
BIN .do_ci.swp
Binary file not shown.
View
7 api_limit
@@ -5760,3 +5760,10 @@
[LOG] Tue Nov 8 11:29:07 2011 http://api.douban.com/people/1529353/collection?cat=movie&tag=&status=&start-index=101&max-results=50&alt=atom 1320722947.47
[LOG] Tue Nov 8 11:29:09 2011 http://api.douban.com/people/1529353/collection?cat=movie&tag=&status=&start-index=151&max-results=50&alt=atom 1320722949.27
[LOG] Tue Nov 8 11:29:11 2011 http://api.douban.com/people/1529353/collection?cat=movie&tag=&status=&start-index=201&max-results=50&alt=atom 1320722951.07
+[LOG] Tue Nov 15 16:58:18 2011 http://api.douban.com/people/junstrix/collection?cat=movie&tag=&status=&start-index=1&max-results=50&alt=atom 1321347498.31
+[LOG] Tue Nov 15 16:58:20 2011 http://api.douban.com/people/47983715/collection?cat=movie&tag=&status=&start-index=1&max-results=50&alt=atom 1321347500.11
+[LOG] Tue Nov 15 16:58:25 2011 http://api.douban.com/people/ldhandzn/collection?cat=movie&tag=&status=&start-index=1&max-results=50&alt=atom 1321347505.17
+[LOG] Tue Nov 15 16:58:26 2011 http://api.douban.com/people/sev7/collection?cat=movie&tag=&status=&start-index=1&max-results=50&alt=atom 1321347506.97
+[LOG] Tue Nov 15 16:58:28 2011 http://api.douban.com/people/sev7/collection?cat=movie&tag=&status=&start-index=51&max-results=50&alt=atom 1321347508.77
+[LOG] Tue Nov 15 16:58:30 2011 http://api.douban.com/people/sev7/collection?cat=movie&tag=&status=&start-index=101&max-results=50&alt=atom 1321347510.57
+[LOG] Tue Nov 15 17:21:59 2011 http://api.douban.com/people/s/collection?cat=movie&tag=&status=&start-index=1&max-results=50&alt=atom 1321348919.50
View
2 argchk.py
@@ -3,7 +3,7 @@
import base64
import urllib2
-IS_LOCAL = False
+IS_LOCAL = True
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
def exp_check(you, exp_code):
if you == None or exp_code == None:
View
2 cache.py
@@ -6,7 +6,7 @@
"wishmusic":"想听", "listeningmusic":"在听", "listenedmusic":"听过",
"wishbook":"想读", "readingbook":"在读", "readbook":"读过"}
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
def write_entry(fh, entry_type, entry):
fh.write('\t<{0}>{1}</{0}>\n'.format(entry_type, entry))
View
2 client.py
@@ -7,7 +7,7 @@
import sys
import pickle
-IS_LOCAL = False
+IS_LOCAL = True
auth_callback_url = 'http://10.10.149.18/cgi-bin/show_queue' if IS_LOCAL == True else 'http://184.164.137.154/cgi-bin/show_queue'
signature_method = oauth.OAuthSignatureMethod_HMAC_SHA1()
View
2 dl.py
@@ -13,7 +13,7 @@
LOCK_UN = fcntl.LOCK_UN
LOCK_NB = fcntl.LOCK_NB
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
APIKEY = "053caab0d0224c680fb600127066e538"
EXIT = False
View
2 do_2people
@@ -21,7 +21,7 @@ import dl
import pickle
CSS = True
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
LINK_DB_PEOPLE = "http://www.douban.com/people/"
people_nr = 5
View
8 do_ci
@@ -20,7 +20,7 @@ import pickle
import gzip
import io
CSS = True
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
LINK_DB_PEOPLE = "http://www.douban.com/people/"
people_nr = 5
@@ -96,14 +96,14 @@ def get_user(group_uri, where, you):
a = line.strip()[0:idx].rpartition(r'">')
if a[0][13:-1].split('/')[-1] != you:
people_list.append([a[0][13:-1].split('/')[-1], a[2], cur_user_icon])
- if next_user_icon != None:
- cur_user_icon = next_user_icon
+ if next_user_icon != None:
+ cur_user_icon = next_user_icon
# people_list[0] is YOU!, if max == 0, that means all the users are in the first page, which can't show the number of max, so max == 0,got it from previous
# lines, so, we need to get all the users in the first pages,which the number could be (0~35).Insteading of just get the number of people_nr
if max == 0:
if len(people_list) - people_nr > 0:
start = random.randint(0, len(people_list) - people_nr)
- people_list = people_list[0:1] + people_list[start : start + people_nr]
+ people_list = people_list[0:1] + people_list[start + 1 : start + 1 + people_nr]
# here, continue with the max == 0 case, get the random 'start' right,then cut the size of people_list to 1 + people_list
fh_write_html.write("<h4>你的幸运数字是 *{0}*</h4>\n".format(start))
View
2 do_ci_test.py
@@ -15,7 +15,7 @@
import argchk
#import url3
# Be careful to import url3 instead of url2
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
View
2 fin_temp
@@ -7,7 +7,7 @@ import time
import url2
import pickle
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
DO_CI_PATH = '/home/sunus/apache/cgi-bin/do_ci' if IS_LOCAL == True else '/usr/local/apache2/cgi-bin/do_ci'
View
2 get_2poauth
@@ -15,7 +15,7 @@ import time
import argchk
#import url3
# Be careful to import url3 instead of url2
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
View
2 get_oauth
@@ -15,7 +15,7 @@ import time
import argchk
#import url3
# Be careful to import url3 instead of url2
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
View
2 no_oauth_adduser.py
@@ -16,7 +16,7 @@
import random
#import url3
# Be careful to import url3 instead of url2
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
View
2 run_forever.py
@@ -7,7 +7,7 @@
import url2
import pickle
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
DO_CI_PATH = '/home/sunus/apache/cgi-bin/do_ci' if IS_LOCAL == True else '/usr/local/apache2/cgi-bin/do_ci'
View
4 run_log
@@ -410,3 +410,7 @@
[LOG] Tue Nov 8 11:28:06 2011: run cmd:python3.1 /home/sunus/apache/cgi-bin/do_ci with args:
[LOG] Thu Nov 10 10:01:55 2011: run cmd:python3.1 /home/sunus/apache/cgi-bin/do_ci with args:
[LOG] Thu Nov 10 10:02:06 2011: run cmd:python2.6 /home/sunus/apache/cgi-bin/sendstatus.py msg 027e95ba86cb3fa7077bc12f9461bef5 sunus http://goo.gl/BkzPZ http://10.10.149.18/history/group_sunus_ilovesoftware_1320890510.html
+[LOG] Tue Nov 15 16:58:17 2011: run cmd:python3.1 /home/sunus/apache/cgi-bin/do_ci with args:
+[LOG] Tue Nov 15 16:58:35 2011: run cmd:python2.6 /home/sunus/apache/cgi-bin/sendstatus.py msg 187be4b0a3cace934973ae11eb606bb9 sunus http://goo.gl/twjh6 http://10.10.149.18/history/group_sunus_python_1321347470.html
+[LOG] Tue Nov 15 17:02:46 2011: run cmd:python3.1 /home/sunus/apache/cgi-bin/do_ci with args:
+[LOG] Tue Nov 15 17:03:06 2011: run cmd:python2.6 /home/sunus/apache/cgi-bin/sendstatus.py msg 77fc6da3d7b08cc267f548eb8711a646 sunus http://goo.gl/VeNV3 http://10.10.149.18/history/group_sunus_python_1321347726.html
View
2 sendstatus.py
@@ -8,7 +8,7 @@
import html_parse
API_KEY = '053caab0d0224c680fb600127066e538'
SECRET = 'f2bebed97e85be8a'
-IS_LOCAL = False
+IS_LOCAL = True
PAGEDIR = "/home/sunus/apache/htdocs/history/" if IS_LOCAL == True else "/usr/local/apache2/htdocs/history/"
def sendmail(client, send_to, subject, content):
View
2 test_forever.py
@@ -7,7 +7,7 @@
import url2
import pickle
-IS_LOCAL = False
+IS_LOCAL = True
ROOTDIR = "/home/sunus/apache/" if IS_LOCAL == True else "/usr/local/apache2/"
HOSTNAME = "http://10.10.149.18/" if IS_LOCAL == True else "http://184.164.137.154/"
DO_CI_PATH = '/home/sunus/apache/cgi-bin/do_ci' if IS_LOCAL == True else '/usr/local/apache2/cgi-bin/do_ci'
View
1 wait_queue
@@ -0,0 +1 @@
+sunus sunus http://www.douban.com/group/python/ Python编程小组 柳州 movie 0 http://goo.gl/rWcWV /home/sunus/apache/htdocs/history/group_sunus_python_1321347931.html e2137229e187d755a63a567da49785ff 1

0 comments on commit 4a9ad28

Please sign in to comment.