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
bc1eb0e0
Commit
bc1eb0e0
authored
6 years ago
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
a5826b8a
No related merge requests found
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
14 deletions
+12
-14
workspace.xml
.idea/workspace.xml
+0
-0
auto_click.py
auto_click.py
+1
-2
auto_click_n.py
auto_click_n.py
+6
-8
auto_commnet.py
auto_commnet.py
+5
-4
No files found.
.idea/workspace.xml
View file @
bc1eb0e0
This diff is collapsed.
Click to expand it.
auto_click.py
View file @
bc1eb0e0
...
@@ -66,12 +66,11 @@ if __name__ == "__main__":
...
@@ -66,12 +66,11 @@ if __name__ == "__main__":
for
i
in
range
(
urge_num
):
for
i
in
range
(
urge_num
):
time
.
sleep
(
random
.
randint
(
1
0
,
5
0
))
time
.
sleep
(
random
.
randint
(
1
,
1
0
))
cook
=
login
()
cook
=
login
()
if
cook
is
not
None
:
if
cook
is
not
None
:
click
(
cook
,
rand_id
)
click
(
cook
,
rand_id
)
time
.
sleep
(
100
)
time
.
sleep
(
100
)
...
...
This diff is collapsed.
Click to expand it.
auto_click_n.py
View file @
bc1eb0e0
...
@@ -9,13 +9,14 @@ from auto_request import login, click, time_convs
...
@@ -9,13 +9,14 @@ from auto_request import login, click, time_convs
from
auto_request
import
host
,
user
,
db
,
passwd
from
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
try
:
try
:
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
=
pc
.
cursor
()
cursor
.
execute
(
cursor
.
execute
(
"SELECT user_id , id FROM topic WHERE is_online=1 and create_time > '
%%%%%
s
%%%%
' and create_time < '
%%%%%
s
%%%%
' "
%
(
numtime
,
numtime2
))
"SELECT user_id , id FROM topic WHERE is_online=1 and create_time > '
%
s' and create_time < '
%
s' "
%
(
numtime
,
numtime2
))
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
topic_id
=
list
(
data
)
topic_id_list
=
[]
topic_id_list
=
[]
...
@@ -32,7 +33,7 @@ def get_data(numtime,numtime2):
...
@@ -32,7 +33,7 @@ def get_data(numtime,numtime2):
except
:
except
:
logging
.
error
(
"catch exception,get_data:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,get_data:
%
s"
%
traceback
.
format_exc
())
return
[]
return
[]
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
@@ -43,9 +44,9 @@ if __name__ == "__main__":
...
@@ -43,9 +44,9 @@ if __name__ == "__main__":
for
i
in
time_list
:
for
i
in
time_list
:
numtime
=
time_convs
(
7
+
3
*
i
)
numtime
1
,
numtime2
=
time_convs
(
7
+
3
*
i
+
1
,
7
+
3
*
i
-
1
)
user_id
=
get_data
(
numtime
)
user_id
=
get_data
(
numtime
1
,
numtime2
)
dict
=
{}
dict
=
{}
...
@@ -77,8 +78,5 @@ if __name__ == "__main__":
...
@@ -77,8 +78,5 @@ if __name__ == "__main__":
if
cook
is
not
None
:
if
cook
is
not
None
:
click
(
cook
,
rand_id
)
click
(
cook
,
rand_id
)
except
:
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
This diff is collapsed.
Click to expand it.
auto_commnet.py
View file @
bc1eb0e0
...
@@ -11,12 +11,13 @@ from auto_request import login, time_convs, reply, get_comment
...
@@ -11,12 +11,13 @@ from auto_request import login, time_convs, reply, get_comment
from
auto_request
import
host
,
user
,
db
,
passwd
from
auto_request
import
host
,
user
,
db
,
passwd
def
get_topic_id
(
numtime
):
def
get_topic_id
(
numtime
1
,
numtime2
):
try
:
try
:
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
=
pc
.
cursor
()
cursor
.
execute
(
cursor
.
execute
(
"SELECT id,user_id FROM topic WHERE is_online=1 and create_time LIKE '
%%%%%
s
%%%%
' "
%
numtime
"SELECT id,user_id FROM topic WHERE is_online=1 and create_time > '
%
s' and create_time < '
%
s' "
%
(
numtime1
,
numtime2
)
)
)
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
topic_id
=
list
(
data
)
...
@@ -43,11 +44,11 @@ if __name__ == "__main__":
...
@@ -43,11 +44,11 @@ if __name__ == "__main__":
try
:
try
:
time_list
=
[
1
]
time_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
for
i
in
time_list
:
for
i
in
time_list
:
numtime
=
time_convs
(
i
)
numtime
=
time_convs
(
i
+
1
,
i
-
1
)
topic_id
=
get_topic_id
(
numtime
)
topic_id
=
get_topic_id
(
numtime
)
...
...
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