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
c1ef7414
Commit
c1ef7414
authored
Apr 25, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
9615b761
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
84 deletions
+212
-84
workspace.xml
.idea/workspace.xml
+84
-69
auto_click1.py
auto_click1.py
+26
-15
auto_click2.py
auto_click2.py
+52
-0
auto_click3.py
auto_click3.py
+50
-0
No files found.
.idea/workspace.xml
View file @
c1ef7414
...
...
@@ -2,8 +2,8 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"fd1f0b61-1139-44e5-87e7-f8b86ff52376"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_
request.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_request
.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/auto_click3.py
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_
click.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_click1
.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -28,7 +28,7 @@
<entry
key=
"batch_user_gen"
value=
"4"
/>
<entry
key=
"comment"
value=
"2"
/>
<entry
key=
"guanshui"
value=
"3"
/>
<entry
key=
"py"
value=
"29
2
"
/>
<entry
key=
"py"
value=
"29
5
"
/>
<entry
key=
"txt"
value=
"9"
/>
<entry
key=
"xuqiu"
value=
"2"
/>
</counts>
...
...
@@ -36,22 +36,22 @@
<usages-collector
id=
"statistics.file.types.open"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"20"
/>
<entry
key=
"Python"
value=
"29
2
"
/>
<entry
key=
"Python"
value=
"29
5
"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.extensions.edit"
>
<counts>
<entry
key=
"comment"
value=
"59"
/>
<entry
key=
"dummy"
value=
"
6
"
/>
<entry
key=
"dummy"
value=
"
7
"
/>
<entry
key=
"guanshui"
value=
"2"
/>
<entry
key=
"py"
value=
"
6822
"
/>
<entry
key=
"py"
value=
"
7208
"
/>
<entry
key=
"xuqiu"
value=
"223"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.types.edit"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"29
0
"
/>
<entry
key=
"Python"
value=
"
6822
"
/>
<entry
key=
"PLAIN_TEXT"
value=
"29
1
"
/>
<entry
key=
"Python"
value=
"
7208
"
/>
</counts>
</usages-collector>
</session>
...
...
@@ -123,7 +123,7 @@
<entry
file=
"file://$PROJECT_DIR$/auto_star_topic.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"710"
>
<caret
line=
"48"
column=
"
62"
selection-start-line=
"48"
selection-start-column=
"62"
selection-end-line=
"48"
selection-end-column=
"62
"
/>
<caret
line=
"48"
column=
"
48"
selection-start-line=
"48"
selection-start-column=
"48"
selection-end-line=
"48"
selection-end-column=
"48
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -132,64 +132,68 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_click.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_click
1
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
410
"
>
<caret
line=
"
28"
column=
"18"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"18"
selection-end-line=
"28"
selection-end-column=
"18
"
/>
<state
relative-caret-position=
"
763
"
>
<caret
line=
"
79"
selection-start-line=
"79"
selection-end-line=
"79
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
<marker
date=
"1556187039000"
expanded=
"true"
signature=
"1195:1318"
ph=
"..."
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/
test
.py"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/
auto_click2
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
825
"
>
<caret
line=
"
55"
column=
"21"
lean-forward=
"true"
selection-start-line=
"55"
selection-start-column=
"21"
selection-end-line=
"55"
selection-end-column=
"21
"
/>
<state
relative-caret-position=
"
248
"
>
<caret
line=
"
23"
column=
"26"
lean-forward=
"true"
selection-start-line=
"23"
selection-start-column=
"26"
selection-end-line=
"23"
selection-end-column=
"26
"
/>
<folding>
<element
signature=
"e#0#1
5
#0"
expanded=
"true"
/>
<element
signature=
"e#0#1
1
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
offline_comment
.py"
>
<entry
file=
"file://$PROJECT_DIR$/
auto_click3
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
88
5"
>
<caret
line=
"
59"
column=
"97"
selection-start-line=
"59"
selection-start-column=
"97"
selection-end-line=
"59"
selection-end-column=
"97
"
/>
<state
relative-caret-position=
"
64
5"
>
<caret
line=
"
43"
lean-forward=
"true"
selection-start-line=
"43"
selection-end-line=
"43
"
/>
<folding>
<element
signature=
"e#0#1
5
#0"
expanded=
"true"
/>
<element
signature=
"e#0#1
1
#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
click_instan
t.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
reques
t.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"354"
>
<caret
line=
"68"
selection-start-line=
"68"
selection-end-line=
"68"
/>
<state
relative-caret-position=
"173"
>
<caret
line=
"147"
column=
"4"
selection-start-line=
"147"
selection-start-column=
"4"
selection-end-line=
"147"
selection-end-column=
"4"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/
auto_follow_one.py
"
>
<entry
file=
"file://$PROJECT_DIR$/
batch_user_gen
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
780
"
>
<caret
line=
"
61"
column=
"20"
selection-start-line=
"61"
selection-start-column=
"20"
selection-end-line=
"61"
selection-end-column=
"20
"
/>
<state
relative-caret-position=
"
15
"
>
<caret
line=
"
299"
column=
"3"
selection-start-line=
"299"
selection-start-column=
"3"
selection-end-line=
"299"
selection-end-column=
"4
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/
auto_requ
est.py"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/
t
est.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
17
3"
>
<caret
line=
"
161"
column=
"52"
lean-forward=
"true"
selection-start-line=
"159"
selection-start-column=
"8"
selection-end-line=
"161"
selection-end-column=
"52
"
/>
<state
relative-caret-position=
"
-
3"
>
<caret
line=
"
21"
column=
"14"
selection-start-line=
"21"
selection-start-column=
"14"
selection-end-line=
"21"
selection-end-column=
"14
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -198,13 +202,10 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
user_id
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
follow_one
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"345"
>
<caret
line=
"23"
column=
"13"
selection-start-line=
"23"
selection-start-column=
"13"
selection-end-line=
"23"
selection-end-column=
"13"
/>
<folding>
<element
signature=
"e#1#15#0"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"-870"
>
<caret
line=
"12"
column=
"22"
selection-start-line=
"12"
selection-start-column=
"22"
selection-end-line=
"12"
selection-end-column=
"22"
/>
</state>
</provider>
</entry>
...
...
@@ -213,7 +214,7 @@
<entry
file=
"file://$PROJECT_DIR$/auto_follow_new.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"560"
>
<caret
line=
"12
2"
column=
"22"
lean-forward=
"true"
selection-start-line=
"122"
selection-start-column=
"22"
selection-end-line=
"122"
selection-end-column=
"22
"
/>
<caret
line=
"12
5"
selection-start-line=
"125"
selection-end-line=
"125
"
/>
</state>
</provider>
</entry>
...
...
@@ -260,9 +261,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/auto_click_star.py"
/>
<option
value=
"$PROJECT_DIR$/aotu_at_once.py"
/>
<option
value=
"$PROJECT_DIR$/auto_every.py"
/>
<option
value=
"$PROJECT_DIR$/exercise.py"
/>
<option
value=
"$PROJECT_DIR$/exe.py"
/>
<option
value=
"$PROJECT_DIR$/auto_pick.py"
/>
...
...
@@ -306,11 +304,14 @@
<option
value=
"$PROJECT_DIR$/auto_star_topic.py"
/>
<option
value=
"$PROJECT_DIR$/auto_every_day.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click_instant.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click.py"
/>
<option
value=
"$PROJECT_DIR$/offline_comment.py"
/>
<option
value=
"$PROJECT_DIR$/testss.py"
/>
<option
value=
"$PROJECT_DIR$/test.py"
/>
<option
value=
"$PROJECT_DIR$/auto_request.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click2.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click3.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click1.py"
/>
</list>
</option>
</component>
...
...
@@ -542,7 +543,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
anchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
weight=
"0.0"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
weight=
"0.0
93596056
"
/>
<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"
/>
...
...
@@ -616,8 +617,6 @@
</breakpoint-manager>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/auto_one_day.py"
/>
<entry
file=
"file://$PROJECT_DIR$/exercise.py"
/>
<entry
file=
"file:///anaconda3/envs/code/lib/python3.6/logging/__init__.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"120"
>
...
...
@@ -686,7 +685,7 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/batch_user_gen"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
480
"
>
<state
relative-caret-position=
"
15
"
>
<caret
line=
"299"
column=
"3"
selection-start-line=
"299"
selection-start-column=
"3"
selection-end-line=
"299"
selection-end-column=
"4"
/>
</state>
</provider>
...
...
@@ -762,9 +761,6 @@
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"345"
>
<caret
line=
"23"
column=
"13"
selection-start-line=
"23"
selection-start-column=
"13"
selection-end-line=
"23"
selection-end-column=
"13"
/>
<folding>
<element
signature=
"e#1#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
...
...
@@ -781,14 +777,14 @@
<entry
file=
"file://$PROJECT_DIR$/auto_follow_new.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"560"
>
<caret
line=
"12
2"
column=
"22"
lean-forward=
"true"
selection-start-line=
"122"
selection-start-column=
"22"
selection-end-line=
"122"
selection-end-column=
"22
"
/>
<caret
line=
"12
5"
selection-start-line=
"125"
selection-end-line=
"125
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/test.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
825
"
>
<caret
line=
"
55"
column=
"21"
lean-forward=
"true"
selection-start-line=
"55"
selection-start-column=
"21"
selection-end-line=
"55"
selection-end-column=
"21
"
/>
<state
relative-caret-position=
"
-3
"
>
<caret
line=
"
21"
column=
"14"
selection-start-line=
"21"
selection-start-column=
"14"
selection-end-line=
"21"
selection-end-column=
"14
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -799,9 +795,6 @@
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"885"
>
<caret
line=
"59"
column=
"97"
selection-start-line=
"59"
selection-start-column=
"97"
selection-end-line=
"59"
selection-end-column=
"97"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
...
...
@@ -812,27 +805,17 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"410"
>
<caret
line=
"28"
column=
"18"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"18"
selection-end-line=
"28"
selection-end-column=
"18"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_follow_one.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
78
0"
>
<caret
line=
"
61"
column=
"20"
selection-start-line=
"61"
selection-start-column=
"20"
selection-end-line=
"61"
selection-end-column=
"20
"
/>
<state
relative-caret-position=
"
-87
0"
>
<caret
line=
"
12"
column=
"22"
selection-start-line=
"12"
selection-start-column=
"22"
selection-end-line=
"12"
selection-end-column=
"22
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_star_topic.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"710"
>
<caret
line=
"48"
column=
"
62"
selection-start-line=
"48"
selection-start-column=
"62"
selection-end-line=
"48"
selection-end-column=
"62
"
/>
<caret
line=
"48"
column=
"
48"
selection-start-line=
"48"
selection-start-column=
"48"
selection-end-line=
"48"
selection-end-column=
"48
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
...
...
@@ -842,12 +825,43 @@
<entry
file=
"file://$PROJECT_DIR$/auto_request.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"173"
>
<caret
line=
"1
61"
column=
"52"
lean-forward=
"true"
selection-start-line=
"159"
selection-start-column=
"8"
selection-end-line=
"161"
selection-end-column=
"52
"
/>
<caret
line=
"1
47"
column=
"4"
selection-start-line=
"147"
selection-start-column=
"4"
selection-end-line=
"147"
selection-end-column=
"4
"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click3.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"645"
>
<caret
line=
"43"
lean-forward=
"true"
selection-start-line=
"43"
selection-end-line=
"43"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click1.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"763"
>
<caret
line=
"79"
selection-start-line=
"79"
selection-end-line=
"79"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
<marker
date=
"1556187039000"
expanded=
"true"
signature=
"1195:1318"
ph=
"..."
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click2.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"248"
>
<caret
line=
"23"
column=
"26"
lean-forward=
"true"
selection-start-line=
"23"
selection-start-column=
"26"
selection-end-line=
"23"
selection-end-column=
"26"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
auto_click.py
→
auto_click
1
.py
View file @
c1ef7414
...
...
@@ -4,20 +4,20 @@ import random
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
login
,
click
,
time_conv
s
from
auto_request
import
login
,
click
,
time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
):
try
:
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time > '
%
s' and create_time <= '
%
s'"
%
(
numtime
,
numtime2
))
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time > '
%
s'"
%
numtime
)
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
topic_id_list
=
[]
try
:
for
i
in
topic_id
and
topic_id
:
cursor
.
execute
(
"select user_id from user_extra where user_id ="
+
str
(
i
[
0
])
+
" and is_shadow =0"
)
...
...
@@ -27,6 +27,10 @@ def get_data(numtime, numtime2):
topic_id_list
.
append
(
i
)
logging
.
info
(
"Database version :
%
s "
%
topic_id_list
)
pc
.
close
()
except
:
pass
return
topic_id_list
except
:
...
...
@@ -34,25 +38,31 @@ def get_data(numtime, numtime2):
return
[]
def
write_id_file
(
id
):
try
:
data
=
open
(
"save_topic_id.txt"
,
"a"
)
data
.
write
(
id
)
data
.
write
(
"/n"
)
except
:
pass
if
__name__
==
"__main__"
:
try
:
time_list
=
[
3
,
4
,
5
,
6
,
7
]
for
i
in
time_list
:
numtime
,
numtime2
=
time_convs
(
i
+
1
,
i
-
1
)
user_id
=
get_data
(
numtime
,
numtime2
)
numtime
=
time_conv
(
10
)
user_id
=
get_data
(
numtime
)
dicts
=
{}
if
user_id
:
for
i
in
user_id
:
if
i
[
0
]
not
in
dicts
.
keys
():
dicts
.
setdefault
(
i
[
0
],
[])
dicts
[
i
[
0
]]
.
append
(
i
[
1
])
else
:
dicts
[
i
[
0
]]
.
append
(
i
[
1
])
...
...
@@ -62,16 +72,17 @@ if __name__ == "__main__":
rand_id
=
value
[
rand_num
]
urge_num
=
random
.
randint
(
0
,
1
)
for
i
in
range
(
urge_num
):
time
.
sleep
(
random
.
randint
(
1
,
10
))
cook
=
login
()
if
cook
is
not
None
:
click
(
cook
,
rand_id
)
write_id_file
(
rand_id
)
else
:
pass
...
...
auto_click2.py
0 → 100644
View file @
c1ef7414
import
time
import
pymysql
import
random
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
login
,
click
,
time_conv
def
write_id_file
():
try
:
user_ids
=
[]
data
=
open
(
"save_topic_id.txt"
,
"r"
)
data2
=
open
(
"save_topic_id_three.txt"
,
"w"
)
for
i
in
data
.
readlines
():
data2
.
write
(
i
)
data2
.
write
(
"
\n
"
)
user_ids
.
append
(
i
)
data
.
truncate
()
return
user_ids
except
:
return
[]
if
__name__
==
"__main__"
:
try
:
user_ids
=
write_id_file
()
lenn
=
len
(
user_ids
)
random
=
[]
for
i
in
range
(
lenn
/
2
):
rand_num
=
random
.
randint
(
0
,
lenn
)
random
.
append
(
lenn
[
rand_num
])
for
i
in
random
:
time
.
sleep
(
random
.
randint
(
10
,
50
))
cook
=
login
()
if
cook
is
not
None
:
click
(
cook
,
i
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
auto_click3.py
0 → 100644
View file @
c1ef7414
import
time
import
pymysql
import
random
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
login
,
click
,
time_conv
def
write_id_file
():
try
:
user_ids
=
[]
data
=
open
(
"save_topic_id_three.txt"
,
"r"
)
for
i
in
data
.
readlines
():
user_ids
.
append
(
i
)
data
.
truncate
()
return
user_ids
except
:
return
[]
if
__name__
==
"__main__"
:
try
:
user_ids
=
write_id_file
()
lenn
=
len
(
user_ids
)
random
=
[]
for
i
in
range
(
lenn
/
2
):
rand_num
=
random
.
randint
(
0
,
lenn
)
random
.
append
(
lenn
[
rand_num
])
for
i
in
random
:
time
.
sleep
(
random
.
randint
(
10
,
30
))
cook
=
login
()
if
cook
is
not
None
:
click
(
cook
,
i
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
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