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
172f3cf4
Commit
172f3cf4
authored
Dec 07, 2018
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
majia new
parent
b0c66013
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
69 additions
and
36 deletions
+69
-36
workspace.xml
.idea/workspace.xml
+0
-0
auto_at_once.py
auto_at_once.py
+23
-8
auto_click.py
auto_click.py
+17
-7
auto_click_n.py
auto_click_n.py
+1
-1
auto_every.py
auto_every.py
+1
-5
auto_follow.py
auto_follow.py
+1
-1
auto_pick.py
auto_pick.py
+1
-1
auto_star_topic.py
auto_star_topic.py
+17
-7
auto_urge.py
auto_urge.py
+1
-1
batch user gen
batch user gen
+0
-0
exercise.py
exercise.py
+7
-5
No files found.
.idea/workspace.xml
View file @
172f3cf4
This diff is collapsed.
Click to expand it.
auto_at_once.py
View file @
172f3cf4
...
...
@@ -17,22 +17,34 @@ def index_first():
return
r1
.
cookies
.
get_dict
()
def
login
():
def
get_majia
():
num_majia
=
random
.
randint
(
1
,
300
)
data
=
open
(
"batch user gen"
)
list
=
[]
for
i
in
data
:
list
.
append
(
i
.
strip
(
'
\n
'
)
.
strip
(
','
))
cookies
=
index_first
()
#
user_id=majia[num]
#
time.sleep(random.randint(0, 500))
user
=
's_PzFznI@shadow.com'
pwd
=
'123456'
maj
=
random
.
randint
(
1
,
300
)
user_id
=
list
[
maj
]
return
user_id
def
login
():
user_id
=
get_majia
()
cookies
=
index_first
()
post_dict
=
{
'account_type'
:
2
,
'pwd'
:
pwd
,
'email'
:
user
'pwd'
:
'123456'
,
'email'
:
user
_id
}
response
=
requests
.
post
(
url
=
login_url
,
...
...
@@ -48,6 +60,8 @@ def login():
print
(
response
.
text
,
'url'
)
print
(
cook
)
return
{
'sessionid'
:
cook
}
def
logins
(
id
):
...
...
@@ -127,6 +141,7 @@ def get_topic_id(numtime):
print
(
"Database version :
%
s "
%
user_id
)
db
.
close
()
return
user_id
def
get_comment
():
...
...
auto_click.py
View file @
172f3cf4
...
...
@@ -20,24 +20,34 @@ def index_first():
return
r1
.
cookies
.
get_dict
()
def
login
(
cookies
,
user
,
pwd
):
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))
# time.sleep(random.randint(300, 500))
maj
=
random
.
randint
(
1
,
300
)
# user_id=majia[maj]
user_id
=
list
[
maj
]
return
user_id
user
=
's_PzFznI@shadow.com'
def
login
():
pwd
=
'123456'
user_id
=
get_majia
()
cookies
=
index_first
()
post_dict
=
{
'account_type'
:
2
,
'pwd'
:
pwd
,
'email'
:
user
'pwd'
:
'123456'
,
'email'
:
user
_id
}
response
=
requests
.
post
(
url
=
login_url
,
...
...
auto_click_n.py
View file @
172f3cf4
...
...
@@ -20,7 +20,7 @@ def index_first():
return
r1
.
cookies
.
get_dict
()
def
login
(
cookies
,
user
,
pwd
):
def
login
():
# time.sleep(random.randint(300, 500))
...
...
auto_every.py
View file @
172f3cf4
...
...
@@ -91,7 +91,7 @@ def get_topic_new_user(numtime):
cursor
.
execute
(
"SELECT user_id FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
topic_data
=
cursor
.
fetchall
()
cursor
.
execute
(
"SELECT user_id FROM group_
follow
WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT user_id FROM group_
user_role
WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
new_user_data
=
cursor
.
fetchall
()
topic_data
=
list
(
topic_data
)
...
...
@@ -165,6 +165,3 @@ if __name__ == "__main__":
# 1.当天发帖:[1-2]个粉丝
# 0.当日加组的用户:[1-2」个粉丝
# 0.当天:[1-10]个pick
\ No newline at end of file
auto_follow.py
View file @
172f3cf4
...
...
@@ -71,7 +71,7 @@ def get_data(numtime):
cursor
=
db
.
cursor
()
print
(
"---------"
)
cursor
.
execute
(
"SELECT
user_id
FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT
distinct(user_id)
FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
...
...
auto_pick.py
View file @
172f3cf4
...
...
@@ -77,7 +77,7 @@ def get_data(numtime):
print
(
"---------"
)
cursor
.
execute
(
"SELECT
user_id
FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT
distinct(user_id)
FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
...
...
auto_star_topic.py
View file @
172f3cf4
...
...
@@ -22,24 +22,34 @@ def index_first():
return
r1
.
cookies
.
get_dict
()
def
login
(
cookies
,
user
,
pwd
):
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))
# time.sleep(random.randint(300, 500))
maj
=
random
.
randint
(
1
,
300
)
# user_id=majia[maj]
user_id
=
list
[
maj
]
return
user_id
user
=
's_PzFznI@shadow.com'
def
login
():
pwd
=
'123456'
user_id
=
get_majia
()
cookies
=
index_first
()
post_dict
=
{
'account_type'
:
2
,
'pwd'
:
pwd
,
'email'
:
user
'pwd'
:
'123456'
,
'email'
:
user
_id
}
response
=
requests
.
post
(
url
=
login_url
,
...
...
auto_urge.py
View file @
172f3cf4
...
...
@@ -71,7 +71,7 @@ def get_data(numtime):
cursor
=
db
.
cursor
()
print
(
"---------"
)
cursor
.
execute
(
"SELECT
user_id
FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT
distinct(user_id)
FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
...
...
batch user gen
0 → 100644
View file @
172f3cf4
This diff is collapsed.
Click to expand it.
exercise.py
View file @
172f3cf4
...
...
@@ -35,17 +35,19 @@
# else:
# dict[i[1]].append(i[0])
import
random
import
time
list
=
{
"key"
:[
259
,
300
,
304
,
307
,
316
,
318
]}
for
key
,
value
in
list
.
items
():
us
=
get_majia
()
rand_num
=
random
.
randint
(
0
,
len
(
value
)
-
1
)
rand_id
=
value
[
rand_num
]
print
(
us
)
print
(
rand_id
)
...
...
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