Commit 918fac34 authored by lixiaofang's avatar lixiaofang

add

parent 0db1078a
......@@ -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.fix import fix_no_comment_click
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):
......@@ -120,6 +121,10 @@ class Command(BaseCommand):
reply_comment3.reply_comment3()
# 获得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():
return None
data = get_data()
print(data)
file = open("/srv/apps/physical/vest/data/user_id.txt", "w")
def auto_user_id():
try:
data = get_data()
print(data)
file = open("/srv/apps/physical/vest/data/user_id.txt", "w")
if data:
if data:
for i in data:
file.write(str(i[0]))
file.write("\n")
except:
logging.error("index_first:%s" % traceback.format_exc())
......@@ -17,6 +17,7 @@ def index_first():
def get_cook():
try:
data = open("/srv/apps/physical/vest/data/vest_user_email.txt")
list = []
dicts = {}
......@@ -45,12 +46,22 @@ def get_cook():
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():
f.write(key)
f.write(",")
f.write(value)
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