Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
1bf05dd1
Commit
1bf05dd1
authored
Aug 10, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url
parent
a86710d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
trans2es_mapping2es.py
trans2es/management/commands/trans2es_mapping2es.py
+4
-5
auto_request.py
vest/request/auto_request.py
+11
-12
No files found.
trans2es/management/commands/trans2es_mapping2es.py
View file @
1bf05dd1
...
...
@@ -67,7 +67,6 @@ class Command(BaseCommand):
# 点赞
if
options
[
"mvest"
]
==
"true_click_one"
:
true_click_one
.
true_click_one
()
if
options
[
"mvest"
]
==
"true_click_two"
:
true_click_two
.
true_click_two
()
...
...
@@ -79,11 +78,11 @@ class Command(BaseCommand):
true_click_five
.
true_click_five
()
# 评论
if
options
[
"mvest"
]
==
"true_c
lick
_one"
:
if
options
[
"mvest"
]
==
"true_c
omment
_one"
:
true_comment_one
.
true_comment_one
()
if
options
[
"mvest"
]
==
"true_c
lick
_two"
:
if
options
[
"mvest"
]
==
"true_c
omment
_two"
:
true_comment_two
.
true_comment_two
()
if
options
[
"mvest"
]
==
"true_c
lick
_three"
:
if
options
[
"mvest"
]
==
"true_c
omment
_three"
:
true_comment_three
.
true_comment_three
()
# 催更
...
...
@@ -95,7 +94,7 @@ class Command(BaseCommand):
auto_lunch_app
.
auto_lunch_app
()
if
options
[
"mvest"
]
==
"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
()
# 关注
...
...
vest/request/auto_request.py
View file @
1bf05dd1
...
...
@@ -10,6 +10,7 @@ import smtplib
from
email.mime.text
import
MIMEText
from
email.utils
import
formataddr
from
physical.settings_local
import
DATABASES
from
physical.settings_local
import
REDIS_URL
my_sender
=
'lixiaofang@igengmei.com'
my_pass
=
'tg5AVKBB8jLQGBET'
...
...
@@ -68,7 +69,7 @@ passwd = DATABASES['default']['PASSWORD']
def
get_majia_reply
(
user_id
):
try
:
data
=
open
(
"/srv/apps/physical/vest_user_email.txt"
)
data
=
open
(
"/srv/apps/physical/vest
/data/vest
_user_email.txt"
)
list
=
[]
for
i
in
data
:
if
i
!=
user_id
:
...
...
@@ -85,7 +86,7 @@ def get_majia_reply(user_id):
def
get_majia
():
try
:
data
=
open
(
"/srv/apps/physical/vest_user_email.txt"
)
data
=
open
(
"/srv/apps/physical/vest
/data/vest
_user_email.txt"
)
list
=
[]
for
i
in
data
:
list
.
append
(
i
.
strip
(
'
\n
'
)
.
strip
(
','
))
...
...
@@ -100,7 +101,7 @@ def get_majia():
def
get_cookies
(
user_id
):
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
:
data
=
f
.
readlines
()
except
:
...
...
@@ -233,7 +234,7 @@ def time_convs(numtime, numtime2):
def
get_comment
():
try
:
data
=
open
(
"/srv/apps/physical/guanshui.txt"
,
"r"
)
data
=
open
(
"/srv/apps/physical/
vest/data/
guanshui.txt"
,
"r"
)
list_guanshui
=
[]
for
i
in
data
:
list_guanshui
.
append
(
i
)
...
...
@@ -251,7 +252,7 @@ def get_comment():
def
get_comments
():
try
:
data
=
open
(
"/srv/apps/physical/guanshui.txt"
,
"r"
)
data
=
open
(
"/srv/apps/physical/
vest/data/
guanshui.txt"
,
"r"
)
list_guanshui
=
[]
for
i
in
data
:
list_guanshui
.
append
(
i
)
...
...
@@ -308,7 +309,7 @@ def Urge(cookies_get, id):
def
get_offline_comment
():
try
:
data
=
open
(
"/srv/apps/physical/comment.txt"
,
"r"
)
data
=
open
(
"/srv/apps/physical/
vest/data/
comment.txt"
,
"r"
)
list_guanshui
=
[]
for
i
in
data
:
...
...
@@ -332,7 +333,7 @@ def get_offline_comment():
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
=
[]
for
i
in
user_data
.
readlines
():
...
...
@@ -382,7 +383,7 @@ def get_answer_data():
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
=
[]
for
i
in
data
:
...
...
@@ -392,7 +393,7 @@ def get_answer_data():
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
=
[]
for
i
in
data
:
...
...
@@ -431,9 +432,7 @@ def reply_answer(cookies_get, id, content):
def
set_reply_to_redis
():
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
except
:
logging
.
error
(
"catch exception,logins:
%
s"
%
traceback
.
format_exc
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment