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
8744fcfb
Commit
8744fcfb
authored
Apr 23, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
dcb2458f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
73 deletions
+78
-73
workspace.xml
.idea/workspace.xml
+52
-50
auto_commnet.py
auto_commnet.py
+0
-5
auto_every_day.py
auto_every_day.py
+12
-14
testss.py
testss.py
+14
-4
No files found.
.idea/workspace.xml
View file @
8744fcfb
...
...
@@ -3,6 +3,8 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"fd1f0b61-1139-44e5-87e7-f8b86ff52376"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/auto_commnet.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_commnet.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_every_day.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_every_day.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/testss.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/testss.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -27,7 +29,7 @@
<entry
key=
"batch_user_gen"
value=
"4"
/>
<entry
key=
"comment"
value=
"2"
/>
<entry
key=
"guanshui"
value=
"3"
/>
<entry
key=
"py"
value=
"23
5
"
/>
<entry
key=
"py"
value=
"23
6
"
/>
<entry
key=
"txt"
value=
"8"
/>
<entry
key=
"xuqiu"
value=
"2"
/>
</counts>
...
...
@@ -35,7 +37,7 @@
<usages-collector
id=
"statistics.file.types.open"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"19"
/>
<entry
key=
"Python"
value=
"23
5
"
/>
<entry
key=
"Python"
value=
"23
6
"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.extensions.edit"
>
...
...
@@ -43,14 +45,14 @@
<entry
key=
"comment"
value=
"59"
/>
<entry
key=
"dummy"
value=
"6"
/>
<entry
key=
"guanshui"
value=
"2"
/>
<entry
key=
"py"
value=
"59
25
"
/>
<entry
key=
"py"
value=
"59
84
"
/>
<entry
key=
"xuqiu"
value=
"223"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.types.edit"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"290"
/>
<entry
key=
"Python"
value=
"59
25
"
/>
<entry
key=
"Python"
value=
"59
84
"
/>
</counts>
</usages-collector>
</session>
...
...
@@ -151,8 +153,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_request.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
1185
"
>
<caret
line=
"
79"
column=
"9"
selection-start-line=
"79"
selection-start-column=
"4"
selection-end-line=
"79"
selection-end-column=
"9
"
/>
<state
relative-caret-position=
"
519
"
>
<caret
line=
"
145"
column=
"56"
lean-forward=
"true"
selection-start-line=
"141"
selection-start-column=
"8"
selection-end-line=
"145"
selection-end-column=
"56
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -163,17 +165,17 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/testss.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
7
0"
>
<caret
line=
"
18"
column=
"15"
lean-forward=
"true"
selection-start-line=
"18"
selection-start-column=
"15"
selection-end-line=
"18"
selection-end-column=
"15
"
/>
<state
relative-caret-position=
"2
5
0"
>
<caret
line=
"
25"
column=
"43"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"43"
selection-end-line=
"25"
selection-end-column=
"43
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
follow_majia
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
click_n
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
293
"
>
<caret
line=
"
56"
column=
"30"
selection-start-line=
"56"
selection-start-column=
"30"
selection-end-line=
"56"
selection-end-column=
"30
"
/>
<state
relative-caret-position=
"
916
"
>
<caret
line=
"
63"
column=
"35"
selection-start-line=
"63"
selection-start-column=
"35"
selection-end-line=
"63"
selection-end-column=
"35
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -182,10 +184,10 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_c
lick_n
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_c
ommnet
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
916
"
>
<caret
line=
"
63"
column=
"35"
selection-start-line=
"63"
selection-start-column=
"35"
selection-end-line=
"63"
selection-end-column=
"35
"
/>
<state
relative-caret-position=
"
359
"
>
<caret
line=
"
74"
column=
"54"
lean-forward=
"true"
selection-start-line=
"74"
selection-start-column=
"54"
selection-end-line=
"74"
selection-end-column=
"54
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -194,10 +196,10 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
commnet
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
every_day
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
166
"
>
<caret
line=
"
54"
column=
"43"
lean-forward=
"true"
selection-start-line=
"54"
selection-start-column=
"43"
selection-end-line=
"54"
selection-end-column=
"43
"
/>
<state
relative-caret-position=
"
335
"
>
<caret
line=
"
73"
column=
"39"
selection-start-line=
"73"
selection-start-column=
"39"
selection-end-line=
"73"
selection-end-column=
"39
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -296,7 +298,6 @@
<option
value=
"$PROJECT_DIR$/com.py"
/>
<option
value=
"$PROJECT_DIR$/auto_star_topic.py"
/>
<option
value=
"$PROJECT_DIR$/auto_follow.py"
/>
<option
value=
"$PROJECT_DIR$/auto_every_day.py"
/>
<option
value=
"$PROJECT_DIR$/auto_lunch_app.py"
/>
<option
value=
"$PROJECT_DIR$/auto_follow_new.py"
/>
<option
value=
"$PROJECT_DIR$/auto_star_urge.py"
/>
...
...
@@ -305,11 +306,12 @@
<option
value=
"$PROJECT_DIR$/auto_follow_majia.py"
/>
<option
value=
"$PROJECT_DIR$/auto_follow_one.py"
/>
<option
value=
"$PROJECT_DIR$/auto_request.py"
/>
<option
value=
"$PROJECT_DIR$/testss.py"
/>
<option
value=
"$PROJECT_DIR$/offline_comment.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click_n.py"
/>
<option
value=
"$PROJECT_DIR$/auto_commnet.py"
/>
<option
value=
"$PROJECT_DIR$/testss.py"
/>
<option
value=
"$PROJECT_DIR$/auto_every_day.py"
/>
</list>
</option>
</component>
...
...
@@ -535,13 +537,13 @@
<window_info
id=
"DB Browser"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
weight=
"0.3284974"
/>
<window_info
a
nchor=
"bottom"
id=
"Run"
order=
"2"
weight=
"0.41379312
"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Run"
order=
"2"
visible=
"true"
weight=
"0.20361248
"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.5632184"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"6"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
show_stripe_button=
"false"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
weight=
"0.19376026
"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"8"
weight=
"0.0
"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"9"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Python Console"
order=
"10"
/>
<window_info
anchor=
"bottom"
id=
"DB Execution Console"
order=
"11"
/>
...
...
@@ -745,16 +747,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_every_day.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"417"
>
<caret
line=
"50"
column=
"16"
selection-start-line=
"50"
selection-start-column=
"16"
selection-end-line=
"50"
selection-end-column=
"16"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_lunch_app.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"359"
>
...
...
@@ -839,13 +831,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/testss.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"270"
>
<caret
line=
"18"
column=
"15"
lean-forward=
"true"
selection-start-line=
"18"
selection-start-column=
"15"
selection-end-line=
"18"
selection-end-column=
"15"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/offline_comment.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"150"
>
...
...
@@ -856,16 +841,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_request.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1185"
>
<caret
line=
"79"
column=
"9"
selection-start-line=
"79"
selection-start-column=
"4"
selection-end-line=
"79"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1050"
>
...
...
@@ -888,8 +863,35 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_commnet.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"166"
>
<caret
line=
"54"
column=
"43"
lean-forward=
"true"
selection-start-line=
"54"
selection-start-column=
"43"
selection-end-line=
"54"
selection-end-column=
"43"
/>
<state
relative-caret-position=
"359"
>
<caret
line=
"74"
column=
"54"
lean-forward=
"true"
selection-start-line=
"74"
selection-start-column=
"54"
selection-end-line=
"74"
selection-end-column=
"54"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_request.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"519"
>
<caret
line=
"145"
column=
"56"
lean-forward=
"true"
selection-start-line=
"141"
selection-start-column=
"8"
selection-end-line=
"145"
selection-end-column=
"56"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/testss.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"250"
>
<caret
line=
"25"
column=
"43"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"43"
selection-end-line=
"25"
selection-end-column=
"43"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_every_day.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"335"
>
<caret
line=
"73"
column=
"39"
selection-start-line=
"73"
selection-start-column=
"39"
selection-end-line=
"73"
selection-end-column=
"39"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
auto_commnet.py
View file @
8744fcfb
...
...
@@ -21,7 +21,6 @@ def get_topic_id(numtime1, numtime2):
)
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
topic_id
)
topic_id_list
=
[]
if
topic_id
:
for
i
in
topic_id
:
...
...
@@ -63,8 +62,6 @@ if __name__ == "__main__":
else
:
dicts
[
i
[
1
]]
.
append
(
i
[
0
])
logging
.
info
(
"get dicts:
%
s"
%
dicts
)
for
key
,
value
in
dicts
.
items
():
rand_num
=
random
.
randint
(
0
,
len
(
value
)
-
1
)
...
...
@@ -73,8 +70,6 @@ if __name__ == "__main__":
comment
=
get_comment
()
logging
.
info
(
"get comment:
%
s"
%
comment
)
for
i
in
range
(
1
):
time
.
sleep
(
random
.
randint
(
10
,
20
))
...
...
auto_every_day.py
View file @
8744fcfb
...
...
@@ -10,22 +10,22 @@ from auto_request import login, time_convs, follow, get_user_id
from
auto_request
import
host
,
user
,
port
,
db
,
passwd
def
get_topic_new_user
(
numtime
):
def
get_topic_new_user
(
numtime
1
,
numtime2
):
try
:
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
port
)
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' "
%
numtime1
)
topic_data
=
cursor
.
fetchall
()
cursor
.
execute
(
"SELECT distinct(user_id) FROM group_user_role WHERE create_time
LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"SELECT distinct(user_id) FROM group_user_role WHERE create_time
> '
%
s'"
%
numtime1
)
new_user_data
=
cursor
.
fetchall
()
topic_data
=
list
(
topic_data
)
new_user_data
=
list
(
new_user_data
)
topic_id_list
=
[]
if
topic_data
:
if
topic_data
:
for
i
in
topic_data
:
cursor
.
execute
(
"select user_id from user_extra where user_id ="
+
str
(
i
[
0
])
+
" and is_shadow =0"
)
...
...
@@ -54,26 +54,24 @@ def get_topic_new_user(numtime):
if
__name__
==
"__main__"
:
try
:
numtime
=
time_convs
(
0
)
numtime
1
,
numtime2
=
time_convs
(
1
,
1
)
user_id
=
get_topic_new_user
(
numtime
)
user_id
=
get_topic_new_user
(
numtime
1
)
follow_num
=
random
.
randint
(
1
,
2
)
for
i
in
range
(
follow_num
):
if
user_id
:
for
j
in
user_id
and
user_id
:
for
j
in
user_id
:
id
=
int
(
j
[
0
])
id
=
int
(
j
[
0
]
)
time
.
sleep
(
random
.
randint
(
10
,
30
)
)
time
.
sleep
(
random
.
randint
(
10
,
30
)
)
cookies
=
login
(
)
cookies
=
login
()
if
cookies
is
not
None
:
follow
(
cookies
,
id
)
if
cookies
is
not
None
:
follow
(
cookies
,
id
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
testss.py
View file @
8744fcfb
...
...
@@ -14,6 +14,16 @@
#
# print(yes_time_str)
# print(yes_time_str2)
import
random
rand_num
=
random
.
randint
(
0
,
2
)
print
(
rand_num
)
\ No newline at end of file
# import random
# rand_num = random.randint(0,2)
# print(rand_n
#
# um)
import
datetime
now
=
datetime
.
datetime
.
now
()
yes_time
=
now
-
datetime
.
timedelta
(
days
=
1
)
yes_time_str
=
yes_time
.
strftime
(
'
%
Y-
%
m-
%
d'
)
yes_time_str
=
yes_time_str
+
' 23:59:59.000000'
print
(
yes_time_str
)
\ 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