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
03a9ceb6
Commit
03a9ceb6
authored
Dec 08, 2018
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try except
parent
e4a4dc41
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
13 deletions
+19
-13
workspace.xml
.idea/workspace.xml
+0
-0
auto_click.py
auto_click.py
+1
-1
auto_follow.py
auto_follow.py
+10
-12
exe.py
exe.py
+8
-0
No files found.
.idea/workspace.xml
View file @
03a9ceb6
This diff is collapsed.
Click to expand it.
auto_click.py
View file @
03a9ceb6
...
...
@@ -114,7 +114,7 @@ def get_data(numtime):
db
=
pymysql
.
connect
(
host
=
"rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com"
,
user
=
'work'
,
passwd
=
'Gengmei123'
,
db
=
"alpha"
,
port
=
3306
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE is_online=1
and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
...
...
auto_follow.py
View file @
03a9ceb6
...
...
@@ -199,27 +199,25 @@ if __name__ == "__main__":
# time.sleep(random.randint(2000,2500))
else
:
numtime
=
time_conv
(
1
)
numtime
=
time_conv
(
1
)
user_id
=
get_commnet_id
(
numtime
)
user_id
=
get_data
(
numtime
)
for
j
in
user_id
:
for
j
in
user_id
:
id
=
int
(
j
[
0
])
id
=
int
(
j
[
0
])
follow_num
=
random
.
randint
(
0
,
1
)
follow_num
=
random
.
randint
(
0
,
1
)
# time.sleep(random.randint(500, 1500))
# time.sleep(random.randint(500, 1500))
for
i
in
range
(
follow_num
):
for
i
in
range
(
follow_num
):
cookies
=
logins
()
cookies
=
logins
()
follow
(
cookies
,
id
)
follow
(
cookies
,
id
)
# time.sleep(random.randint(2000, 3000))
# time.sleep(random.randint(2000, 3000))
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
...
...
exe.py
0 → 100644
View file @
03a9ceb6
time_list
=
[
1
,
11
]
for
i
in
range
(
len
(
time_list
)):
if
time_list
[
i
]
!=
11
:
print
(
time_list
[
i
])
\ No newline at end of file
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