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
53be1169
Commit
53be1169
authored
Apr 19, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
a840c8d8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
48 deletions
+78
-48
workspace.xml
.idea/workspace.xml
+45
-45
instant.py
instant.py
+33
-3
No files found.
.idea/workspace.xml
View file @
53be1169
...
...
@@ -2,7 +2,7 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"fd1f0b61-1139-44e5-87e7-f8b86ff52376"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/
offline_comment.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/offline_comme
nt.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
instant.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/insta
nt.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -42,14 +42,14 @@
<entry
key=
"comment"
value=
"59"
/>
<entry
key=
"dummy"
value=
"6"
/>
<entry
key=
"guanshui"
value=
"2"
/>
<entry
key=
"py"
value=
"
3966
"
/>
<entry
key=
"py"
value=
"
4011
"
/>
<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=
"
3966
"
/>
<entry
key=
"Python"
value=
"
4011
"
/>
</counts>
</usages-collector>
</session>
...
...
@@ -120,17 +120,17 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_at_once.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
105
"
>
<state
relative-caret-position=
"
-11
"
>
<caret
line=
"7"
column=
"22"
selection-start-line=
"7"
selection-end-line=
"8"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/instant.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
300
"
>
<caret
line=
"
20"
column=
"63"
lean-forward=
"true"
selection-start-line=
"20"
selection-start-column=
"63"
selection-end-line=
"20"
selection-end-column=
"63
"
/>
<state
relative-caret-position=
"
789
"
>
<caret
line=
"
80"
lean-forward=
"true"
selection-start-line=
"80"
selection-end-line=
"80
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -138,14 +138,14 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/offline_comment.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
321
"
>
<caret
line=
"
52"
column=
"18"
selection-start-line=
"52"
selection-start-column=
"18"
selection-end-line=
"52"
selection-end-column=
"18
"
/>
<state
relative-caret-position=
"
1196
"
>
<caret
line=
"
86"
column=
"27"
selection-start-line=
"86"
selection-start-column=
"27"
selection-end-line=
"86"
selection-end-column=
"27
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
<marker
date=
"1555668
230000"
expanded=
"true"
signature=
"1833:1834
"
ph=
"..."
/>
<marker
date=
"1555668
385000"
expanded=
"true"
signature=
"1859:1860
"
ph=
"..."
/>
</folding>
</state>
</provider>
...
...
@@ -154,8 +154,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_user_id.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"300"
>
<caret
l
ine=
"20"
column=
"19"
selection-start-line=
"20"
selection-start-column=
"19"
selection-end-line=
"20"
selection-end-column=
"19
"
/>
<state>
<caret
l
ean-forward=
"true
"
/>
<folding>
<element
signature=
"e#1#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -166,7 +166,7 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_click.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4
19
"
>
<state
relative-caret-position=
"4
20
"
>
<caret
line=
"28"
column=
"8"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"8"
selection-end-line=
"28"
selection-end-column=
"8"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
...
...
@@ -178,7 +178,7 @@
<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=
"
-1062
"
>
<state
relative-caret-position=
"
465
"
>
<caret
line=
"31"
selection-start-line=
"31"
selection-end-line=
"31"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
...
...
@@ -284,11 +284,11 @@
<option
value=
"$PROJECT_DIR$/_celery.py"
/>
<option
value=
"$PROJECT_DIR$/auto_at_once.py"
/>
<option
value=
"$PROJECT_DIR$/comment.txt"
/>
<option
value=
"$PROJECT_DIR$/instant.py"
/>
<option
value=
"$PROJECT_DIR$/auto_user_id.py"
/>
<option
value=
"$PROJECT_DIR$/auto_request.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click.py"
/>
<option
value=
"$PROJECT_DIR$/offline_comment.py"
/>
<option
value=
"$PROJECT_DIR$/instant.py"
/>
</list>
</option>
</component>
...
...
@@ -511,7 +511,7 @@
<layout>
<window_info
id=
"Structure"
order=
"0"
sideWeight=
"0.21188119"
side_tool=
"true"
weight=
"0.19112115"
/>
<window_info
id=
"Favorites"
order=
"1"
side_tool=
"true"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"2"
sideWeight=
"0.7872763"
visible=
"true"
weight=
"0.1790416"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"2"
sideWeight=
"0.7872763"
visible=
"true"
weight=
"0.1790416"
/>
<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"
/>
...
...
@@ -521,7 +521,7 @@
<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.32953367
"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
weight=
"0.074611396
"
/>
<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"
/>
...
...
@@ -874,29 +874,40 @@
<entry
file=
"file://$PROJECT_DIR$/user_id.txt"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
insta
nt.py"
>
<entry
file=
"file://$PROJECT_DIR$/
offline_comme
nt.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
300
"
>
<caret
line=
"
20"
column=
"63"
lean-forward=
"true"
selection-start-line=
"20"
selection-start-column=
"63"
selection-end-line=
"20"
selection-end-column=
"63
"
/>
<state
relative-caret-position=
"
1196
"
>
<caret
line=
"
86"
column=
"27"
selection-start-line=
"86"
selection-start-column=
"27"
selection-end-line=
"86"
selection-end-column=
"27
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
<marker
date=
"1555668385000"
expanded=
"true"
signature=
"1859:1860"
ph=
"..."
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_user_id.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"300"
>
<caret
l
ine=
"20"
column=
"19"
selection-start-line=
"20"
selection-start-column=
"19"
selection-end-line=
"20"
selection-end-column=
"19
"
/>
<state>
<caret
l
ean-forward=
"true
"
/>
<folding>
<element
signature=
"e#1#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=
"420"
>
<caret
line=
"28"
column=
"8"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"8"
selection-end-line=
"28"
selection-end-column=
"8"
/>
<folding>
<element
signature=
"e#0#11#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=
"
-1062
"
>
<state
relative-caret-position=
"
465
"
>
<caret
line=
"31"
selection-start-line=
"31"
selection-end-line=
"31"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
...
...
@@ -911,23 +922,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_at_once.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"105"
>
<caret
line=
"7"
column=
"22"
selection-start-line=
"7"
selection-end-line=
"8"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"419"
>
<caret
line=
"28"
column=
"8"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"8"
selection-end-line=
"28"
selection-end-column=
"8"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click_n.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"735"
>
...
...
@@ -938,13 +932,19 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/offline_comment.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_at_once.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-11"
>
<caret
line=
"7"
column=
"22"
selection-start-line=
"7"
selection-end-line=
"8"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/instant.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
321
"
>
<caret
line=
"
52"
column=
"18"
selection-start-line=
"52"
selection-start-column=
"18"
selection-end-line=
"52"
selection-end-column=
"18
"
/>
<state
relative-caret-position=
"
789
"
>
<caret
line=
"
80"
lean-forward=
"true"
selection-start-line=
"80"
selection-end-line=
"80
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
<marker
date=
"1555668230000"
expanded=
"true"
signature=
"1833:1834"
ph=
"..."
/>
</folding>
</state>
</provider>
...
...
instant.py
View file @
53be1169
...
...
@@ -7,7 +7,7 @@ import pandas as pd
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
get_offline_comment
,
login
,
click
from
auto_request
import
login
,
click
,
get_comments
,
reply
import
threading
from
auto_request
import
host
,
user
,
db
,
passwd
...
...
@@ -18,7 +18,8 @@ if __name__ == "__main__":
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT id,user_id FROM topic WHERE id = "
+
str
(
927745
)
+
" and user_id in (select user_id from user_extra where is_shadow = 0)"
)
"SELECT id,user_id FROM topic WHERE id = "
+
str
(
id
)
+
" and user_id in (select user_id from user_extra where is_shadow = 0)"
)
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
topic_id_list
)
...
...
@@ -28,10 +29,35 @@ if __name__ == "__main__":
exec_count
=
0
if
topic_id_list
:
def
fun_comment
():
cookies
=
login
()
if
cookies
:
comment_content
=
get_comments
()
comment
=
comment_content
[
0
]
reply
(
cookies
,
id
,
comment
)
global
timer
global
exec_count
exec_count
+=
1
if
exec_count
==
1
:
sleep_time
=
random
.
randint
(
300
,
540
)
sleep_time
=
30
timer
=
threading
.
Timer
(
sleep_time
,
fun_comment
)
timer
.
start
()
if
exec_count
==
2
:
sleep_time
=
random
.
randint
(
1000
,
1900
)
sleep_time
=
30
timer
=
threading
.
Timer
(
sleep_time
,
fun_comment
)
timer
.
start
()
def
fun_timer
():
cookies
=
login
()
if
cookies
:
click
(
cookies
,
topic_id_list
)
click
(
cookies
,
topic_id_list
[
0
])
global
timer
global
exec_count
...
...
@@ -49,7 +75,11 @@ if __name__ == "__main__":
timer
.
start
()
sleep_time
=
random
.
randint
(
300
,
540
)
timer
=
threading
.
Timer
(
10
,
fun_comment
)
# 首次启动
timer
.
start
()
sleep_time
=
random
.
randint
(
300
,
540
)
timer
=
threading
.
Timer
(
10
,
fun_timer
)
# 首次启动
timer
.
start
()
...
...
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