Commit 918fac34 authored by lixiaofang's avatar lixiaofang

add

parent 0db1078a
...@@ -13,6 +13,7 @@ from vest.follow import auto_follow, auto_follow_new ...@@ -13,6 +13,7 @@ from vest.follow import auto_follow, auto_follow_new
from vest.urge import auto_star_urge, auto_lunch_app, auto_lunch_app2, auto_urge1, auto_urge2 from vest.urge import auto_star_urge, auto_lunch_app, auto_lunch_app2, auto_urge1, auto_urge2
from vest.fix import fix_no_comment_click from vest.fix import fix_no_comment_click
from vest.reply_answer import reply_comment2, reply_comment3, answer_reply2, answer_reply3, answer_reply1 from vest.reply_answer import reply_comment2, reply_comment3, answer_reply2, answer_reply3, answer_reply1
from vest.request import get_session, auto_request, auto_user_id
class Command(BaseCommand): class Command(BaseCommand):
...@@ -120,6 +121,10 @@ class Command(BaseCommand): ...@@ -120,6 +121,10 @@ class Command(BaseCommand):
reply_comment3.reply_comment3() reply_comment3.reply_comment3()
# 获得session和use_id # 获得session和use_id
if options["mvest"] == "get_login_session":
get_session.get_session()
if options["mvest"] == "get_user_id":
auto_user_id.auto_user_id()
......
...@@ -31,11 +31,15 @@ def get_data(): ...@@ -31,11 +31,15 @@ def get_data():
return None return None
data = get_data() def auto_user_id():
print(data) try:
file = open("/srv/apps/physical/vest/data/user_id.txt", "w") data = get_data()
print(data)
file = open("/srv/apps/physical/vest/data/user_id.txt", "w")
if data: if data:
for i in data: for i in data:
file.write(str(i[0])) file.write(str(i[0]))
file.write("\n") file.write("\n")
except:
logging.error("index_first:%s" % traceback.format_exc())
...@@ -17,6 +17,7 @@ def index_first(): ...@@ -17,6 +17,7 @@ def index_first():
def get_cook(): def get_cook():
try:
data = open("/srv/apps/physical/vest/data/vest_user_email.txt") data = open("/srv/apps/physical/vest/data/vest_user_email.txt")
list = [] list = []
dicts = {} dicts = {}
...@@ -45,12 +46,22 @@ def get_cook(): ...@@ -45,12 +46,22 @@ def get_cook():
return dicts return dicts
except:
logging.error("index_first:%s" % traceback.format_exc())
return None
dicts = get_cook()
with open("/srv/apps/physical/vest/data/user_session.txt", 'w') as f: def get_session():
try:
dicts = get_cook()
with open("/srv/apps/physical/vest/data/user_session.txt", 'w') as f:
for key, value in dicts.items(): for key, value in dicts.items():
f.write(key) f.write(key)
f.write(",") f.write(",")
f.write(value) f.write(value)
f.write("\n") f.write("\n")
except:
logging.error("index_first:%s" % traceback.format_exc())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment