Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cybertron
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
cybertron
Commits
3be4c09b
Commit
3be4c09b
authored
Apr 23, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
ea26371e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
29 deletions
+20
-29
workspace.xml
.idea/workspace.xml
+0
-0
auto_follow_new.py
auto_follow_new.py
+7
-7
auto_lunch_app.py
auto_lunch_app.py
+3
-3
auto_star_topic.py
auto_star_topic.py
+4
-8
auto_star_urge.py
auto_star_urge.py
+3
-3
auto_urge.py
auto_urge.py
+3
-8
No files found.
.idea/workspace.xml
View file @
3be4c09b
This diff is collapsed.
Click to expand it.
auto_follow_new.py
View file @
3be4c09b
...
...
@@ -15,31 +15,31 @@ def get_commnet_id(numtime):
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id FROM reply WHERE create_time
LIKE '
%%%%%
s
%%%%
' "
%
numtime
)
"SELECT user_id FROM reply WHERE create_time
> '
%
s
' "
%
numtime
)
data_comment
=
cursor
.
fetchall
()
cursor
.
execute
(
"SELECT t.user_id from topic t left join reply r on r.topic_id = t.id WHERE r.create_time
LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"SELECT t.user_id from topic t left join reply r on r.topic_id = t.id WHERE r.create_time
> '
%
s
'"
%
numtime
)
data_reply_topic
=
cursor
.
fetchall
()
cursor
.
execute
(
"SELECT r.user_id from reply r left join reply p on r.replied_id = p.replied_id WHERE p.create_time
LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"SELECT r.user_id from reply r left join reply p on r.replied_id = p.replied_id WHERE p.create_time
> '
%
s
'"
%
numtime
)
data_reply_reply
=
cursor
.
fetchall
()
cursor
.
execute
(
"SELECT user_id FROM group_user_role WHERE create_time
LIKE '
%%%%%
s
%%%%
' "
%
numtime
)
"SELECT user_id FROM group_user_role WHERE create_time
> '
%
s
' "
%
numtime
)
data_group_follow
=
cursor
.
fetchall
()
cursor
.
execute
(
"select user_id from account_user WHERE create_time
LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"select user_id from account_user WHERE create_time
> '
%
s
'"
%
numtime
)
data_new_user
=
cursor
.
fetchall
()
...
...
@@ -101,9 +101,9 @@ if __name__ == "__main__":
try
:
numtime
=
time_convs
(
1
)
numtime
1
,
numtime2
=
time_convs
(
1
,
2
)
user_id
=
get_commnet_id
(
numtime
)
user_id
=
get_commnet_id
(
numtime
1
)
for
j
in
user_id
and
user_id
:
...
...
auto_lunch_app.py
View file @
3be4c09b
...
...
@@ -15,7 +15,7 @@ def get_data(numtime):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"select distinct(user_id) from pv_maidian where page_name ='home' and partiton_date
like '
%%%%%
s
%%%%
'"
%
numtime
)
"select distinct(user_id) from pv_maidian where page_name ='home' and partiton_date
> '
%
s
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
topic_id_list
=
[]
...
...
@@ -37,9 +37,9 @@ def get_data(numtime):
if
__name__
==
"__main__"
:
try
:
numtime
=
time_convs
(
1
)
numtime
1
,
numtime2
=
time_convs
(
1
,
2
)
user_id
=
get_data
(
numtime
)
user_id
=
get_data
(
numtime
1
)
urge_num
=
random
.
randint
(
0
,
1
)
for
j
in
range
(
urge_num
):
for
i
in
user_id
and
user_id
:
...
...
auto_star_topic.py
View file @
3be4c09b
...
...
@@ -15,7 +15,7 @@ def get_star_user_id(numtime):
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 is_online=1 and (content_level =4 or content_level =5) and create_time
LIKE '
%%%%%
s
%%%%
' "
%
numtime
)
"SELECT user_id,id FROM topic WHERE is_online=1 and (content_level =4 or content_level =5) and create_time
> '
%
s
' "
%
numtime
)
data
=
cursor
.
fetchall
()
user_id_list
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id_list
)
...
...
@@ -43,9 +43,9 @@ if __name__ == "__main__":
for
i
in
time_list
:
numtime
=
time_conv
(
i
)
numtime
1
,
numtime2
=
time_conv
(
i
+
1
,
i
-
1
)
user_topic_id
=
get_star_user_id
(
numtime
)
user_topic_id
=
get_star_user_id
(
numtime
1
)
if
user_topic_id
:
...
...
@@ -64,9 +64,7 @@ if __name__ == "__main__":
if
cookies
is
not
None
:
click
(
cookies
,
id
)
time
.
sleep
(
300
)
user_id
=
get_star_user_id
(
numtime
)
user_id
=
get_star_user_id
(
numtime1
)
if
user_id
:
...
...
@@ -83,7 +81,5 @@ if __name__ == "__main__":
if
cookies
is
not
None
:
follow
(
cookies
,
id
)
time
.
sleep
(
300
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
auto_star_urge.py
View file @
3be4c09b
...
...
@@ -15,7 +15,7 @@ def get_star_useid(numtime):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and (content_level =4 or content_level =5) and create_time
LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and (content_level =4 or content_level =5) and create_time
> '
%
s
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
topic_id_list
=
[]
...
...
@@ -42,9 +42,9 @@ if __name__ == "__main__":
for
i
in
time_list
:
numtime
=
time_conv
(
i
)
numtime
1
,
numtime2
=
time_conv
(
i
+
1
,
i
-
1
)
user_id
=
get_star_useid
(
numtime
)
user_id
=
get_star_useid
(
numtime
1
)
for
j
in
user_id
and
user_id
:
...
...
auto_urge.py
View file @
3be4c09b
...
...
@@ -16,7 +16,7 @@ def get_data(numtime):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time
LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time
> '
%
s
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
...
...
@@ -46,9 +46,9 @@ if __name__ == "__main__":
for
i
in
time_list
:
numtime
=
time_conv
(
i
)
numtime
1
,
numtime2
=
time_conv
(
i
+
1
,
i
-
1
)
user_id
=
get_data
(
numtime
)
user_id
=
get_data
(
numtime
1
)
urge_num
=
random
.
randint
(
0
,
2
)
...
...
@@ -64,10 +64,5 @@ if __name__ == "__main__":
if
cookies
is
not
None
:
Urge
(
cookies
,
id
)
sleep_time
=
random
.
randint
(
300
,
540
)
timer
=
threading
.
Timer
(
1
,
urge_user
)
# 首次启动
timer
.
start
()
except
:
logging
.
error
(
"catch exception,main:
%
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