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
2c6edb5e
Commit
2c6edb5e
authored
6 years ago
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
c59454e5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
311 additions
and
81 deletions
+311
-81
workspace.xml
.idea/workspace.xml
+105
-78
auto_click3.py
auto_click3.py
+0
-3
auto_comment1.py
auto_comment1.py
+95
-0
auto_comment2.py
auto_comment2.py
+56
-0
auto_comment3.py
auto_comment3.py
+55
-0
No files found.
.idea/workspace.xml
View file @
2c6edb5e
...
...
@@ -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$/auto_click
2.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_click2
.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_click
3.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_click3
.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -27,7 +27,7 @@
<entry
key=
"batch_user_gen"
value=
"4"
/>
<entry
key=
"comment"
value=
"2"
/>
<entry
key=
"guanshui"
value=
"3"
/>
<entry
key=
"py"
value=
"29
5
"
/>
<entry
key=
"py"
value=
"29
9
"
/>
<entry
key=
"txt"
value=
"9"
/>
<entry
key=
"xuqiu"
value=
"2"
/>
</counts>
...
...
@@ -35,7 +35,7 @@
<usages-collector
id=
"statistics.file.types.open"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"20"
/>
<entry
key=
"Python"
value=
"29
5
"
/>
<entry
key=
"Python"
value=
"29
9
"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.extensions.edit"
>
...
...
@@ -43,14 +43,14 @@
<entry
key=
"comment"
value=
"59"
/>
<entry
key=
"dummy"
value=
"7"
/>
<entry
key=
"guanshui"
value=
"2"
/>
<entry
key=
"py"
value=
"74
10
"
/>
<entry
key=
"py"
value=
"74
91
"
/>
<entry
key=
"xuqiu"
value=
"223"
/>
</counts>
</usages-collector>
<usages-collector
id=
"statistics.file.types.edit"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"291"
/>
<entry
key=
"Python"
value=
"74
10
"
/>
<entry
key=
"Python"
value=
"74
91
"
/>
</counts>
</usages-collector>
</session>
...
...
@@ -133,8 +133,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_click1.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
25
0"
>
<caret
line=
"
43"
column=
"43"
selection-start-line=
"43"
selection-start-column=
"43"
selection-end-line=
"43"
selection-end-column=
"43
"
/>
<state
relative-caret-position=
"
10
0"
>
<caret
line=
"
33"
column=
"28"
lean-forward=
"true"
selection-end-line=
"94
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
<marker
date=
"1556188717000"
expanded=
"true"
signature=
"1265:1454"
ph=
"..."
/>
...
...
@@ -143,11 +143,11 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/auto_click2.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
284
"
>
<caret
line=
"
42"
selection-start-line=
"42"
selection-end-line=
"42
"
/>
<state
relative-caret-position=
"
435
"
>
<caret
line=
"
29"
lean-forward=
"true"
selection-start-line=
"29"
selection-end-line=
"29
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
...
...
@@ -158,8 +158,8 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_click3.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
22
5"
>
<caret
line=
"
15"
column=
"40"
selection-start-line=
"15"
selection-start-column=
"40"
selection-end-line=
"15"
selection-end-column=
"40
"
/>
<state
relative-caret-position=
"
37
5"
>
<caret
line=
"
25"
column=
"26"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"26"
selection-end-line=
"25"
selection-end-column=
"26
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
...
...
@@ -168,64 +168,70 @@
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
request
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
comment1
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
194
"
>
<caret
line=
"
147"
column=
"4"
selection-start-line=
"147"
selection-start-column=
"4"
selection-end-line=
"147"
selection-end-column=
"4
"
/>
<state
relative-caret-position=
"
492
"
>
<caret
line=
"
84"
column=
"42"
lean-forward=
"true"
selection-start-line=
"84"
selection-start-column=
"42"
selection-end-line=
"84"
selection-end-column=
"42
"
/>
<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$/
batch_user_gen
"
>
<entry
file=
"file://$PROJECT_DIR$/
auto_commnet.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
relative-caret-position=
"269"
>
<caret
line=
"75"
column=
"39"
lean-forward=
"true"
selection-start-line=
"75"
selection-start-column=
"16"
selection-end-line=
"75"
selection-end-column=
"39"
/>
<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$/
test
.py"
>
<entry
file=
"file://$PROJECT_DIR$/
auto_comment2
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
"
/>
<state
relative-caret-position=
"
464
"
>
<caret
line=
"
53"
column=
"43"
selection-start-line=
"47"
selection-start-column=
"16"
selection-end-line=
"53"
selection-end-column=
"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=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
follow_one
.py"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
comment3
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
relative-caret-position=
"-241"
>
<caret
line=
"6"
column=
"66"
selection-start-line=
"6"
selection-start-column=
"66"
selection-end-line=
"6"
selection-end-column=
"66"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
follow_new
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
request
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"560"
>
<caret
line=
"125"
selection-start-line=
"125"
selection-end-line=
"125"
/>
<state
relative-caret-position=
"194"
>
<caret
line=
"173"
column=
"4"
selection-start-line=
"173"
selection-start-column=
"4"
selection-end-line=
"173"
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_
every_day
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
follow_one
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"795"
>
<caret
line=
"53"
column=
"26"
selection-start-line=
"53"
selection-start-column=
"26"
selection-end-line=
"53"
selection-end-column=
"26"
/>
<folding>
<element
signature=
"e#0#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>
...
...
@@ -260,9 +266,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/exercise.py"
/>
<option
value=
"$PROJECT_DIR$/exe.py"
/>
<option
value=
"$PROJECT_DIR$/auto_pick.py"
/>
<option
value=
"$PROJECT_DIR$/auto_pick_five.py"
/>
<option
value=
"$PROJECT_DIR$/auto_star_pick.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click_one.py"
/>
...
...
@@ -308,9 +311,12 @@
<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_click3.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click1.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click2.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click3.py"
/>
<option
value=
"$PROJECT_DIR$/auto_comment1.py"
/>
<option
value=
"$PROJECT_DIR$/auto_comment2.py"
/>
<option
value=
"$PROJECT_DIR$/auto_comment3.py"
/>
</list>
</option>
</component>
...
...
@@ -332,6 +338,11 @@
<item
name=
"cybertron"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cybertron"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"cybertron"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cybertron"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"auto_commnet.py"
type=
"8704e2dd:PyFileNode"
/>
</path>
</expand>
<select
/>
</subPane>
...
...
@@ -528,10 +539,11 @@
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"0"
y=
"23"
width=
"1280"
height=
"724"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<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.17871326"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"2"
sideWeight=
"0.7872763"
visible=
"true"
weight=
"0.17871326"
/>
<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"
/>
...
...
@@ -541,7 +553,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.20525451
"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
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"
/>
...
...
@@ -615,21 +627,6 @@
</breakpoint-manager>
</component>
<component
name=
"editorHistoryManager"
>
<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"
>
<caret
line=
"1060"
selection-start-line=
"1060"
selection-end-line=
"1060"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/Library/Caches/PyCharmCE2018.2/python_stubs/906302355/builtins.py"
/>
<entry
file=
"file:///anaconda3/envs/code/lib/python3.6/http/client.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"81"
>
<caret
line=
"435"
selection-start-line=
"435"
selection-end-line=
"435"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.local/lib/python3.6/site-packages/urllib3/response.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"126"
>
...
...
@@ -745,16 +742,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_commnet.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1005"
>
<caret
line=
"67"
column=
"20"
selection-start-line=
"67"
selection-start-column=
"20"
selection-end-line=
"67"
selection-end-column=
"20"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</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=
"345"
>
...
...
@@ -820,20 +807,20 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_
request
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_
click2
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
194
"
>
<caret
line=
"
147"
column=
"4"
selection-start-line=
"147"
selection-start-column=
"4"
selection-end-line=
"147"
selection-end-column=
"4
"
/>
<state
relative-caret-position=
"
435
"
>
<caret
line=
"
29"
lean-forward=
"true"
selection-start-line=
"29"
selection-end-line=
"29
"
/>
<folding>
<element
signature=
"e#0#1
5
#0"
expanded=
"true"
/>
<element
signature=
"e#0#1
1
#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=
"
22
5"
>
<caret
line=
"
15"
column=
"40"
selection-start-line=
"15"
selection-start-column=
"40"
selection-end-line=
"15"
selection-end-column=
"40
"
/>
<state
relative-caret-position=
"
37
5"
>
<caret
line=
"
25"
column=
"26"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"26"
selection-end-line=
"25"
selection-end-column=
"26
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
...
...
@@ -842,8 +829,8 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click1.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
25
0"
>
<caret
line=
"
43"
column=
"43"
selection-start-line=
"43"
selection-start-column=
"43"
selection-end-line=
"43"
selection-end-column=
"43
"
/>
<state
relative-caret-position=
"
10
0"
>
<caret
line=
"
33"
column=
"28"
lean-forward=
"true"
selection-end-line=
"94
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
<marker
date=
"1556188717000"
expanded=
"true"
signature=
"1265:1454"
ph=
"..."
/>
...
...
@@ -851,10 +838,50 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_click2.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_request.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"194"
>
<caret
line=
"173"
column=
"4"
selection-start-line=
"173"
selection-start-column=
"4"
selection-end-line=
"173"
selection-end-column=
"4"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_comment1.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"492"
>
<caret
line=
"84"
column=
"42"
lean-forward=
"true"
selection-start-line=
"84"
selection-start-column=
"42"
selection-end-line=
"84"
selection-end-column=
"42"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_commnet.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"269"
>
<caret
line=
"75"
column=
"39"
lean-forward=
"true"
selection-start-line=
"75"
selection-start-column=
"16"
selection-end-line=
"75"
selection-end-column=
"39"
/>
<folding>
<element
signature=
"e#0#15#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_comment2.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"464"
>
<caret
line=
"53"
column=
"43"
selection-start-line=
"47"
selection-start-column=
"16"
selection-end-line=
"53"
selection-end-column=
"43"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_comment3.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
284
"
>
<caret
line=
"
42"
selection-start-line=
"42"
selection-end-line=
"42
"
/>
<state
relative-caret-position=
"
-241
"
>
<caret
line=
"
6"
column=
"66"
selection-start-line=
"6"
selection-start-column=
"66"
selection-end-line=
"6"
selection-end-column=
"66
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
...
...
This diff is collapsed.
Click to expand it.
auto_click3.py
View file @
2c6edb5e
...
...
@@ -23,7 +23,6 @@ def write_id_file():
return
[]
if
__name__
==
"__main__"
:
try
:
...
...
@@ -36,9 +35,7 @@ if __name__ == "__main__":
for
i
in
range
(
lenn
%
2
):
rand_num
=
random
.
randint
(
0
,
len
(
user_ids
)
-
1
)
randoms_id
.
append
(
user_ids
[
rand_num
])
if
randoms_id
:
for
i
in
randoms_id
:
...
...
This diff is collapsed.
Click to expand it.
auto_comment1.py
0 → 100644
View file @
2c6edb5e
import
time
import
pymysql
import
random
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
login
,
click
,
time_conv
,
get_comment
,
reply
from
auto_request
import
host
,
user
,
db
,
passwd
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'"
%
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"
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
if
user_id
:
topic_id_list
.
append
(
i
)
logging
.
info
(
"Database version :
%
s "
%
topic_id_list
)
pc
.
close
()
except
:
pass
return
topic_id_list
except
:
logging
.
error
(
"catch exception,get_data:
%
s"
%
traceback
.
format_exc
())
return
[]
def
write_id_file
(
id
):
try
:
data
=
open
(
"save_topic_comment_id.txt"
,
"w"
)
data
.
truncate
()
data
=
open
(
"save_topic_comment_id.txt"
,
"a"
)
data
.
write
(
str
(
id
))
data
.
write
(
"
\n
"
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
if
__name__
==
"__main__"
:
try
:
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
])
for
key
,
value
in
dicts
.
items
():
rand_num
=
random
.
randint
(
0
,
len
(
value
)
-
1
)
rand_id
=
value
[
rand_num
]
time
.
sleep
(
random
.
randint
(
1
,
10
))
cook
=
login
()
comment
=
get_comment
()
if
cook
is
not
None
:
write_id_file
(
rand_id
)
reply
(
cook
,
rand_id
,
comment
)
else
:
pass
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
This diff is collapsed.
Click to expand it.
auto_comment2.py
0 → 100644
View file @
2c6edb5e
import
time
import
pymysql
import
random
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
login
,
click
,
time_conv
,
reply
,
get_comment
def
write_id_file
():
try
:
user_ids
=
[]
data
=
open
(
"save_topic_comment_id.txt"
,
"r"
)
data2
=
open
(
"save_topic_id_comment_three.txt"
,
"w"
)
for
i
in
data
.
readlines
():
data2
.
write
(
str
(
i
.
strip
()))
data2
.
write
(
"
\n
"
)
user_ids
.
append
(
int
(
i
))
return
user_ids
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
return
[]
if
__name__
==
"__main__"
:
try
:
user_ids
=
write_id_file
()
lenn
=
len
(
user_ids
)
randoms_id
=
[]
for
i
in
range
(
lenn
%
2
):
rand_num
=
random
.
randint
(
0
,
len
(
user_ids
)
-
1
)
randoms_id
.
append
(
user_ids
[
rand_num
])
if
randoms_id
:
for
i
in
randoms_id
:
time
.
sleep
(
random
.
randint
(
10
,
50
))
comment
=
get_comment
()
cook
=
login
()
if
cook
is
not
None
:
reply
(
cook
,
i
,
comment
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
This diff is collapsed.
Click to expand it.
auto_comment3.py
0 → 100644
View file @
2c6edb5e
import
time
import
pymysql
import
random
import
traceback
from
log_settings
import
*
import
logging
from
auto_request
import
login
,
click
,
time_conv
,
get_comment
,
reply
def
write_id_file
():
try
:
user_ids
=
[]
data
=
open
(
"save_topic_id_comment_three.txt"
,
"r"
)
for
i
in
data
.
readlines
():
user_ids
.
append
(
int
(
i
.
strip
()))
data
=
open
(
"save_topic_id_comment_three.txt"
,
"w"
)
data
.
truncate
()
return
user_ids
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
return
[]
if
__name__
==
"__main__"
:
try
:
user_ids
=
write_id_file
()
lenn
=
len
(
user_ids
)
randoms_id
=
[]
for
i
in
range
(
lenn
%
2
):
rand_num
=
random
.
randint
(
0
,
len
(
user_ids
)
-
1
)
randoms_id
.
append
(
user_ids
[
rand_num
])
if
randoms_id
:
for
i
in
randoms_id
:
time
.
sleep
(
random
.
randint
(
10
,
50
))
cook
=
login
()
comment
=
get_comment
()
cook
=
login
()
if
cook
is
not
None
:
reply
(
cook
,
i
,
comment
)
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
This diff is collapsed.
Click to expand it.
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