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
alpha
physical
Commits
ff173e40
Commit
ff173e40
authored
Sep 11, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
22e1d414
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
21 deletions
+39
-21
trans2es_mapping2es.py
trans2es/management/commands/trans2es_mapping2es.py
+19
-1
before_yesterday_topic_reply.py
vest/change_reply/before_yesterday_topic_reply.py
+3
-3
five_days_ago_topic_reply.py
vest/change_reply/five_days_ago_topic_reply.py
+3
-3
seven_days_ago_reply.py
vest/change_reply/seven_days_ago_reply.py
+3
-3
three_days_ago_topic_reply.py
vest/change_reply/three_days_ago_topic_reply.py
+3
-3
yesterday_topic_reply.py
vest/change_reply/yesterday_topic_reply.py
+2
-2
auto_request.py
vest/request/auto_request.py
+4
-4
get_session.py
vest/request/get_session.py
+2
-2
No files found.
trans2es/management/commands/trans2es_mapping2es.py
View file @
ff173e40
...
...
@@ -16,7 +16,9 @@ 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_user_id
from
vest.vest_majiauser
import
vest_click_reply
from
vest.pictorial
import
principal_offline_comment1
,
principal_online_comment1
,
no_reply_principal
from
vest.pictorial
import
principal_offline_comment1
,
principal_online_comment1
,
no_reply_principal
from
vest.change_reply
import
yesterday_topic_reply
,
before_yesterday_topic_reply
,
seven_days_ago_reply
,
\
three_days_ago_topic_reply
,
five_days_ago_topic_reply
class
Command
(
BaseCommand
):
...
...
@@ -146,6 +148,22 @@ class Command(BaseCommand):
if
options
[
"mvest"
]
==
"no_reply_principal"
:
no_reply_principal
.
no_reply_principal
()
### 修改评论
if
options
[
"mvest"
]
==
"yesterday_topic_reply"
:
yesterday_topic_reply
.
yesterday_comment_one
()
if
options
[
"mvest"
]
==
"before_yesterday_topic_reply"
:
before_yesterday_topic_reply
.
before_yesterday_comment_one
()
if
options
[
"mvest"
]
==
"three_days_ago_topic_reply"
:
three_days_ago_topic_reply
.
three_days_ago_comment_one
()
if
options
[
"mvest"
]
==
"five_days_ago_topic_reply"
:
five_days_ago_topic_reply
.
five_days_ago_comment_one
()
if
options
[
"mvest"
]
==
"seven_days_ago_reply"
:
seven_days_ago_reply
.
serven_days_ago_comment_one
()
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
vest/change_reply/before_yesterday_topic_reply.py
View file @
ff173e40
...
...
@@ -16,8 +16,8 @@ def get_data(numtime, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE (create_time >
'
%
s' and create_time <
'
%
s' ) and is_online=1 "
%
(
numtime
,
numtime2
))
"SELECT user_id,id FROM topic WHERE (create_time >
= '
%
s' and create_time <=
'
%
s' ) and is_online=1 "
%
(
numtime
2
,
numtime
))
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
return
topic_id_list
...
...
@@ -30,7 +30,7 @@ def get_data(numtime, numtime2):
def
before_yesterday_comment_one
():
try
:
logging
.
info
(
"comment one"
)
numtime
,
numtime2
=
time_convs
(
2
,
1
)
numtime
,
numtime2
=
time_convs
(
2
,
2
)
topic_id_list
=
get_data
(
numtime
,
numtime2
)
if
topic_id_list
:
for
i
in
topic_id_list
:
...
...
vest/change_reply/five_days_ago_topic_reply.py
View file @
ff173e40
...
...
@@ -16,8 +16,8 @@ def get_data(numtime, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE (create_time >
'
%
s' and create_time <
'
%
s' ) and is_online=1 "
%
(
numtime
,
numtime2
))
"SELECT user_id,id FROM topic WHERE (create_time >
= '
%
s' and create_time <=
'
%
s' ) and is_online=1 "
%
(
numtime
2
,
numtime
))
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
return
topic_id_list
...
...
@@ -30,7 +30,7 @@ def get_data(numtime, numtime2):
def
five_days_ago_comment_one
():
try
:
logging
.
info
(
"comment one"
)
numtime
,
numtime2
=
time_convs
(
5
,
1
)
numtime
,
numtime2
=
time_convs
(
5
,
5
)
topic_id_list
=
get_data
(
numtime
,
numtime2
)
if
topic_id_list
:
for
i
in
topic_id_list
:
...
...
vest/change_reply/seven_days_ago_reply.py
View file @
ff173e40
...
...
@@ -16,8 +16,8 @@ def get_data(numtime, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE (create_time >
'
%
s' and create_time <
'
%
s' ) and is_online=1 "
%
(
numtime
,
numtime2
))
"SELECT user_id,id FROM topic WHERE (create_time >
= '
%
s' and create_time <=
'
%
s' ) and is_online=1 "
%
(
numtime
2
,
numtime
))
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
return
topic_id_list
...
...
@@ -30,7 +30,7 @@ def get_data(numtime, numtime2):
def
serven_days_ago_comment_one
():
try
:
logging
.
info
(
"comment one"
)
numtime
,
numtime2
=
time_convs
(
7
,
1
)
numtime
,
numtime2
=
time_convs
(
7
,
7
)
topic_id_list
=
get_data
(
numtime
,
numtime2
)
if
topic_id_list
:
for
i
in
topic_id_list
:
...
...
vest/change_reply/three_days_ago_topic_reply.py
View file @
ff173e40
...
...
@@ -16,8 +16,8 @@ def get_data(numtime, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE (create_time >
'
%
s' and create_time <
'
%
s' ) and is_online=1 "
%
(
numtime
,
numtime2
))
"SELECT user_id,id FROM topic WHERE (create_time >
= '
%
s' and create_time <=
'
%
s' ) and is_online=1 "
%
(
numtime
2
,
numtime
))
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
return
topic_id_list
...
...
@@ -30,7 +30,7 @@ def get_data(numtime, numtime2):
def
three_days_ago_comment_one
():
try
:
logging
.
info
(
"comment one"
)
numtime
,
numtime2
=
time_convs
(
3
,
1
)
numtime
,
numtime2
=
time_convs
(
3
,
3
)
topic_id_list
=
get_data
(
numtime
,
numtime2
)
if
topic_id_list
:
for
i
in
topic_id_list
:
...
...
vest/change_reply/yesterday_topic_reply.py
View file @
ff173e40
...
...
@@ -16,8 +16,8 @@ def get_data(numtime, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE (create_time >
'
%
s' and create_time <
'
%
s' ) and is_online=1 "
%
(
numtime
,
numtime2
))
"SELECT user_id,id FROM topic WHERE (create_time >
= '
%
s' and create_time <=
'
%
s' ) and is_online=1 "
%
(
numtime
2
,
numtime
))
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
return
topic_id_list
...
...
vest/request/auto_request.py
View file @
ff173e40
...
...
@@ -20,10 +20,10 @@ my_sender = 'lixiaofang@igengmei.com'
my_pass
=
'tg5AVKBB8jLQGBET'
my_user6
=
"lixiaofang@igengmei.com"
auto_click_url
=
settings
.
auto_click_url
auto_reply_url
=
settings
.
auto_reply_url
auto_follow_url
=
settings
.
auto_follow_url
auto_urge_url
=
settings
.
auto_urge_url
auto_click_url
=
settings
.
AUTO_CLICK_URL
auto_reply_url
=
settings
.
AUTO_REPLY_URL
auto_follow_url
=
settings
.
AUTO_FOLLOW_URL
auto_urge_url
=
settings
.
AUTO_URGE_URL
host
=
DATABASES
[
'default'
][
'HOST'
]
...
...
vest/request/get_session.py
View file @
ff173e40
...
...
@@ -9,7 +9,7 @@ from django.conf import settings
def
index_first
():
try
:
r1
=
requests
.
get
(
settings
.
login_url
)
r1
=
requests
.
get
(
settings
.
LOGIN_URL
)
return
r1
.
cookies
.
get_dict
()
except
:
logging
.
error
(
"index_first:
%
s"
%
traceback
.
format_exc
())
...
...
@@ -31,7 +31,7 @@ def get_cook():
'email'
:
i
}
response
=
requests
.
post
(
url
=
settings
.
login_url
,
url
=
settings
.
LOGIN_URL
,
data
=
post_dict
,
cookies
=
cookies
)
...
...
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