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
b133c0c9
Commit
b133c0c9
authored
Aug 20, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into pictorial_real_data
parents
748b6708
5855c068
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
no_reply_principal.py
vest/pictorial/no_reply_principal.py
+8
-5
No files found.
vest/pictorial/no_reply_principal.py
View file @
b133c0c9
...
...
@@ -15,12 +15,15 @@ def get_data():
print
(
"...."
)
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"select creator_id,id from community_pictorial where is_online =True and is_deleted=False and id not in (select pictorial_id from reply group by pictorial_id)"
)
cursor
.
execute
(
"select count(*),pictorial_id from reply group by pictorial_id"
)
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
data_all
=
[]
for
i
in
topic_id
:
if
i
[
0
]
<=
4
:
data_all
.
append
(
i
)
logging
.
info
(
"Database version :
%
s "
%
topic_id
)
return
topic_id
return
data_all
except
:
logging
.
error
(
"catch exception,get_data:
%
s"
%
traceback
.
format_exc
())
...
...
@@ -31,9 +34,9 @@ def no_reply_principal():
try
:
logging
.
info
(
"comment offline pictorial"
)
user_id
=
get_data
()
dicts
=
{}
for
i
in
user_id
:
for
num
in
range
(
4
):
follow_num
=
random
.
randint
(
1
,
5
)
for
num
in
range
(
follow_num
):
majia_user_id
=
get_majia_reply
(
i
[
0
])
cook
=
logins
(
majia_user_id
)
comment
=
get_pictorial_comment
()
...
...
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