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
81c37f5c
Commit
81c37f5c
authored
Dec 07, 2018
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
majia new
parent
e23caac3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
29 deletions
+44
-29
workspace.xml
.idea/workspace.xml
+0
-0
auto_click.py
auto_click.py
+6
-6
auto_follow_majia.py
auto_follow_majia.py
+8
-8
batch user gen
batch user gen
+0
-0
exercise.py
exercise.py
+30
-15
No files found.
.idea/workspace.xml
View file @
81c37f5c
This diff is collapsed.
Click to expand it.
auto_click.py
View file @
81c37f5c
...
...
@@ -46,18 +46,18 @@ def login():
num_majia
=
random
.
randint
(
1
,
300
)
# user_id=
majia[num_majia]
user_id
=
get_
majia
[
num_majia
]
user
=
's_PzFznI@shadow.com'
pwd
=
'123456'
#
user = 's_PzFznI@shadow.com'
#
#
pwd = '123456'
cookies
=
index_first
()
post_dict
=
{
'account_type'
:
2
,
'pwd'
:
pwd
,
'email'
:
user
'pwd'
:
'123456'
,
'email'
:
user
_id
}
response
=
requests
.
post
(
url
=
login_url
,
...
...
auto_follow_majia.py
View file @
81c37f5c
...
...
@@ -28,12 +28,12 @@ def get_majia():
# time.sleep(random.randint(0, 500))
#
# maj = random.randint(1, len(list))
#
# user_id=list[maj]
maj
=
random
.
randint
(
1
,
300
)
user_id
=
list
[
maj
]
return
user_id
return
list
def
logins
(
id
):
...
...
@@ -84,7 +84,7 @@ def get_follw_majia(numtime,id):
cursor
=
db
.
cursor
()
print
(
"---------"
)
cursor
.
execute
(
"SELECT user_id,follow_id FROM user_follow WHERE create_time
< = '
%
s' "
%
numtime
)
cursor
.
execute
(
"SELECT user_id,follow_id FROM user_follow WHERE create_time
<= '
%
s' "
,(
numtime
)
)
data
=
cursor
.
fetchall
()
...
...
@@ -97,7 +97,7 @@ def get_follw_majia(numtime,id):
if
__name__
==
"__main__"
:
numtime
=
time_conv
(
3
)
numtime
=
time_conv
()
# get majia zhanghao
...
...
@@ -116,7 +116,7 @@ if __name__ == "__main__":
for
key
,
value
in
dict
.
items
():
majia
=
1
,
2
,
3
,
4
,
5
,
6
,
7
majia
=
get_majia
()
if
key
in
majia
:
...
...
batch user gen
View file @
81c37f5c
This diff is collapsed.
Click to expand it.
exercise.py
View file @
81c37f5c
x
=
1
d
=
1
,
2
,
3
,
4
,
4
,
5
,
6
,
6
if
x
in
d
:
# import random
#
#
# def get_majia():
#
# data = open("batch user gen")
#
# list=[]
# for i in data:
# list.append(i.strip('\n').strip(','))
#
#
# # time.sleep(random.randint(0, 500))
#
#
# maj = random.randint(1, len(list))
#
# user_id=list[maj]
#
# return user_id
#
# print(get_majia())
list
=
[
1
,
23
,
4
,
5
]
x
=
5
if
x
in
list
:
print
(
x
)
\ 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