Commit 1bf05dd1 authored by lixiaofang's avatar lixiaofang

url

parent a86710d6
...@@ -67,7 +67,6 @@ class Command(BaseCommand): ...@@ -67,7 +67,6 @@ class Command(BaseCommand):
# 点赞 # 点赞
if options["mvest"] == "true_click_one": if options["mvest"] == "true_click_one":
true_click_one.true_click_one() true_click_one.true_click_one()
if options["mvest"] == "true_click_two": if options["mvest"] == "true_click_two":
true_click_two.true_click_two() true_click_two.true_click_two()
...@@ -79,11 +78,11 @@ class Command(BaseCommand): ...@@ -79,11 +78,11 @@ class Command(BaseCommand):
true_click_five.true_click_five() true_click_five.true_click_five()
# 评论 # 评论
if options["mvest"] == "true_click_one": if options["mvest"] == "true_comment_one":
true_comment_one.true_comment_one() true_comment_one.true_comment_one()
if options["mvest"] == "true_click_two": if options["mvest"] == "true_comment_two":
true_comment_two.true_comment_two() true_comment_two.true_comment_two()
if options["mvest"] == "true_click_three": if options["mvest"] == "true_comment_three":
true_comment_three.true_comment_three() true_comment_three.true_comment_three()
# 催更 # 催更
...@@ -95,7 +94,7 @@ class Command(BaseCommand): ...@@ -95,7 +94,7 @@ class Command(BaseCommand):
auto_lunch_app.auto_lunch_app() auto_lunch_app.auto_lunch_app()
if options["mvest"] == "auto_lunch_app2": if options["mvest"] == "auto_lunch_app2":
auto_lunch_app2.auto_lunch_app2() auto_lunch_app2.auto_lunch_app2()
if options["mvest"] == "auto_lunch_app2": if options["mvest"] == "auto_star_urge":
auto_star_urge.auto_star_urge() auto_star_urge.auto_star_urge()
# 关注 # 关注
......
...@@ -10,6 +10,7 @@ import smtplib ...@@ -10,6 +10,7 @@ import smtplib
from email.mime.text import MIMEText from email.mime.text import MIMEText
from email.utils import formataddr from email.utils import formataddr
from physical.settings_local import DATABASES from physical.settings_local import DATABASES
from physical.settings_local import REDIS_URL
my_sender = 'lixiaofang@igengmei.com' my_sender = 'lixiaofang@igengmei.com'
my_pass = 'tg5AVKBB8jLQGBET' my_pass = 'tg5AVKBB8jLQGBET'
...@@ -68,7 +69,7 @@ passwd = DATABASES['default']['PASSWORD'] ...@@ -68,7 +69,7 @@ passwd = DATABASES['default']['PASSWORD']
def get_majia_reply(user_id): def get_majia_reply(user_id):
try: try:
data = open("/srv/apps/physical/vest_user_email.txt") data = open("/srv/apps/physical/vest/data/vest_user_email.txt")
list = [] list = []
for i in data: for i in data:
if i != user_id: if i != user_id:
...@@ -85,7 +86,7 @@ def get_majia_reply(user_id): ...@@ -85,7 +86,7 @@ def get_majia_reply(user_id):
def get_majia(): def get_majia():
try: try:
data = open("/srv/apps/physical/vest_user_email.txt") data = open("/srv/apps/physical/vest/data/vest_user_email.txt")
list = [] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
...@@ -100,7 +101,7 @@ def get_majia(): ...@@ -100,7 +101,7 @@ def get_majia():
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("/data/log/physical/app/user_session.txt", 'r') as f: with open("/srv/apps/physical/vest/data/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -233,7 +234,7 @@ def time_convs(numtime, numtime2): ...@@ -233,7 +234,7 @@ def time_convs(numtime, numtime2):
def get_comment(): def get_comment():
try: try:
data = open("/srv/apps/physical/guanshui.txt", "r") data = open("/srv/apps/physical/vest/data/guanshui.txt", "r")
list_guanshui = [] list_guanshui = []
for i in data: for i in data:
list_guanshui.append(i) list_guanshui.append(i)
...@@ -251,7 +252,7 @@ def get_comment(): ...@@ -251,7 +252,7 @@ def get_comment():
def get_comments(): def get_comments():
try: try:
data = open("/srv/apps/physical/guanshui.txt", "r") data = open("/srv/apps/physical/vest/data/guanshui.txt", "r")
list_guanshui = [] list_guanshui = []
for i in data: for i in data:
list_guanshui.append(i) list_guanshui.append(i)
...@@ -308,7 +309,7 @@ def Urge(cookies_get, id): ...@@ -308,7 +309,7 @@ def Urge(cookies_get, id):
def get_offline_comment(): def get_offline_comment():
try: try:
data = open("/srv/apps/physical/comment.txt", "r") data = open("/srv/apps/physical/vest/data/comment.txt", "r")
list_guanshui = [] list_guanshui = []
for i in data: for i in data:
...@@ -332,7 +333,7 @@ def get_offline_comment(): ...@@ -332,7 +333,7 @@ def get_offline_comment():
def get_user_id(): def get_user_id():
user_data = open("/srv/apps/physical/user_id.txt", "r") user_data = open("/srv/apps/physical/vest/data/get_user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
...@@ -382,7 +383,7 @@ def get_answer_data(): ...@@ -382,7 +383,7 @@ def get_answer_data():
try: try:
# 获取第一条评论 # 获取第一条评论
data = open("/srv/apps/physical/reply_answer_data1.txt", "r") data = open("/srv/apps/physical/vest/data/reply_answer_data1.txt", "r")
answer_data1 = [] answer_data1 = []
for i in data: for i in data:
...@@ -392,7 +393,7 @@ def get_answer_data(): ...@@ -392,7 +393,7 @@ def get_answer_data():
comment1 = answer_data1[num1 - 1] comment1 = answer_data1[num1 - 1]
# 获取第二条评论 # 获取第二条评论
data = open("/srv/apps/physical/reply_answer_data2.txt", "r") data = open("/srv/apps/physical/vest/data/reply_answer_data2.txt", "r")
answer_data2 = [] answer_data2 = []
for i in data: for i in data:
...@@ -431,9 +432,7 @@ def reply_answer(cookies_get, id, content): ...@@ -431,9 +432,7 @@ def reply_answer(cookies_get, id, content):
def set_reply_to_redis(): def set_reply_to_redis():
try: try:
redis_url = "redis://:gHtmeIqBhVHtH8MG@172.17.40.140:6379/1" redis_client = redis.StrictRedis.from_url(REDIS_URL)
redis_client = redis.StrictRedis.from_url(redis_url)
return redis_client return redis_client
except: except:
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%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