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
f62a2931
Commit
f62a2931
authored
5 years ago
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
f2142cd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
20 deletions
+29
-20
principal_online_comment1.py
vest/pictorial/principal_online_comment1.py
+4
-17
true_comment_one.py
vest/reply/true_comment_one.py
+0
-3
auto_request.py
vest/request/auto_request.py
+25
-0
No files found.
vest/pictorial/principal_online_comment1.py
View file @
f62a2931
...
...
@@ -2,9 +2,9 @@ import pymysql
import
random
import
traceback
import
logging
from
vest.request.auto_request
import
logins
,
pictorial_reply
,
get_majia
,
get_pictorial_comment
,
time_conv_minute
from
vest.request.auto_request
import
logins
,
pictorial_reply
,
get_majia
,
get_pictorial_comment
,
time_conv_minute
,
\
judge_pictorial_info_get_comment
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
from
vest.data.topic_models
import
get_pictorial_tag_by_id
"""
榜单新增内容(仅限在线的)
...
...
@@ -74,14 +74,7 @@ def principal_online_comment1():
for
num
in
range
(
random_num
):
majia_user_id
=
get_majia
()
cook
=
logins
(
majia_user_id
)
comment
=
""
# 判断是不是编辑标签
edit_judge
=
get_pictorial_tag_by_id
(
i
[
0
])
if
edit_judge
:
rand_tag_id
=
random
.
randint
(
0
,
len
(
edit_judge
)
-
1
)
comment
=
get_pictorial_comment
()
else
:
comment
=
get_pictorial_comment
()
comment
=
get_pictorial_comment
()
if
cook
is
not
None
:
pictorial_reply
(
cook
,
i
[
0
],
comment
)
if
data_vote
:
...
...
@@ -90,15 +83,9 @@ def principal_online_comment1():
for
num
in
range
(
random_num
):
majia_user_id
=
get_majia
()
cook
=
logins
(
majia_user_id
)
edit_judge
=
get_pictorial_tag_by_id
(
i
[
0
])
if
edit_judge
:
rand_tag_id
=
random
.
randint
(
0
,
len
(
edit_judge
)
-
1
)
comment
=
get_pictorial_comment
()
else
:
comment
=
get_pictorial_comment
()
comment
=
get_pictorial_comment
()
if
cook
is
not
None
:
pictorial_reply
(
cook
,
i
[
0
],
comment
)
else
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
except
:
...
...
This diff is collapsed.
Click to expand it.
vest/reply/true_comment_one.py
View file @
f62a2931
...
...
@@ -5,9 +5,6 @@ from vest.request.auto_request import login, time_conv, get_comment, reply, get_
get_category_tag_id
,
get_category_reply_commtent
,
judge_topic_info_get_comment
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
from
libs.error
import
logging_exception
from
vest.data.topic_models
import
get_edit_tag_id_list
,
get_pictorial_tag_by_id
,
get_topic_product_info
,
\
topic_has_image
import
random
def
get_data
(
numtime
,
numtime2
):
...
...
This diff is collapsed.
Click to expand it.
vest/request/auto_request.py
View file @
f62a2931
...
...
@@ -590,3 +590,28 @@ def judge_topic_info_get_comment(topic_id):
logging
.
error
(
"catch exception,logins:
%
s"
%
traceback
.
format_exc
())
return
None
def
judge_pictorial_info_get_comment
(
topic_id
):
try
:
comment
=
""
# 先判断是不是编辑标签
edit_tag_list
=
get_pictorial_tag_by_id
(
topic_id
)
if
len
(
edit_tag_list
)
>
0
:
# 如果有编辑标签
# 去拿他的所属分类 根据分类去拿对应的标签(随机拿一个)
category_tag_id
=
get_category_tag_id
(
edit_tag_list
)
if
category_tag_id
>
0
:
comment
=
get_category_reply_commtent
(
category_tag_id
)
else
:
comment
=
get_pictorial_comment
()
else
:
# 原始评论
comment
=
get_comment
()
logging
.
info
(
"get judge_topic_info_get_comment:
%
s"
%
comment
)
return
comment
except
:
logging
.
error
(
"catch exception,logins:
%
s"
%
traceback
.
format_exc
())
return
None
This diff is collapsed.
Click to expand it.
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