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
38755886
Commit
38755886
authored
Aug 22, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
82ec9d3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
topic_models.py
vest/data/topic_models.py
+4
-11
auto_request.py
vest/request/auto_request.py
+6
-4
No files found.
vest/data/topic_models.py
View file @
38755886
...
@@ -85,17 +85,10 @@ def get_category_tag_id(edit_tag_list):
...
@@ -85,17 +85,10 @@ def get_category_tag_id(edit_tag_list):
all_category_tag_list
=
CommunityCategoryTagRelation
.
objects
.
filter
(
tag_id__in
=
edit_tag_list
,
is_online
=
True
,
all_category_tag_list
=
CommunityCategoryTagRelation
.
objects
.
filter
(
tag_id__in
=
edit_tag_list
,
is_online
=
True
,
is_deleted
=
False
)
.
values_list
(
is_deleted
=
False
)
.
values_list
(
"category_tag_id"
,
flat
=
True
)
"category_tag_id"
,
flat
=
True
)
##去掉明星,品牌,其他的分类
if
len
(
all_category_tag_list
)
>
0
:
category_tag
=
[]
index
=
randint
(
0
,
len
(
all_category_tag_list
)
-
1
)
for
i
in
all_category_tag_list
:
if
i
not
in
[
707000
,
348494
,
18344
]:
return
all_category_tag_list
[
index
]
category_tag
.
append
(
i
)
# 随机拿一个
logging
.
info
(
"get get_category_tag_id:
%
s"
%
category_tag
)
if
len
(
category_tag
)
>
0
:
index
=
randint
(
0
,
len
(
category_tag
)
-
1
)
return
category_tag
[
index
]
else
:
else
:
return
0
return
0
...
...
vest/request/auto_request.py
View file @
38755886
...
@@ -498,19 +498,21 @@ def get_category_reply_commtent(category_id):
...
@@ -498,19 +498,21 @@ def get_category_reply_commtent(category_id):
try
:
try
:
# 发型42、穿搭46、美妆3、护肤4、美甲21972、香水17576、瘦身32605、配饰5305608
# 发型42、穿搭46、美妆3、护肤4、美甲21972、香水17576、瘦身32605、配饰5305608
file
=
""
file
=
""
if
category_id
==
3
:
# 美妆
if
category_id
==
3
:
# 美妆
logging
.
info
(
"3-------------"
)
logging
.
info
(
"3-------------"
)
file
=
"/srv/apps/physical/vest/data/beauty_reply_data.txt"
file
=
"/srv/apps/physical/vest/data/beauty_reply_data.txt"
if
category_id
==
42
:
# 发型
el
if
category_id
==
42
:
# 发型
logging
.
info
(
"42-------------"
)
logging
.
info
(
"42-------------"
)
file
=
"/srv/apps/physical/vest/data/hairstyle_reply_data.txt"
file
=
"/srv/apps/physical/vest/data/hairstyle_reply_data.txt"
if
category_id
==
4
:
# 护肤
el
if
category_id
==
4
:
# 护肤
logging
.
info
(
"4-------------"
)
logging
.
info
(
"4-------------"
)
file
=
"/srv/apps/physical/vest/data/skincare_reply_data.txt"
file
=
"/srv/apps/physical/vest/data/skincare_reply_data.txt"
if
category_id
==
46
:
# 穿搭
el
if
category_id
==
46
:
# 穿搭
logging
.
info
(
"46-------------"
)
logging
.
info
(
"46-------------"
)
file
=
"/srv/apps/physical/vest/data/wear_repy_data.txt"
file
=
"/srv/apps/physical/vest/data/wear_repy_data.txt"
else
:
comment
=
get_comment
()
return
comment
data
=
open
(
file
,
"r"
)
data
=
open
(
file
,
"r"
)
list_guanshui
=
[]
list_guanshui
=
[]
for
i
in
data
:
for
i
in
data
:
...
...
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