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
70c3373d
Commit
70c3373d
authored
Apr 26, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
16db11dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
30 deletions
+26
-30
workspace.xml
.idea/workspace.xml
+18
-23
auto_click1.py
auto_click1.py
+4
-4
auto_comment1.py
auto_comment1.py
+1
-1
auto_request.py
auto_request.py
+3
-2
No files found.
.idea/workspace.xml
View file @
70c3373d
...
...
@@ -2,13 +2,8 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"fd1f0b61-1139-44e5-87e7-f8b86ff52376"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/save_topic_id_comment_three.txt"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_click2.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_click2.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_click3.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_click3.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_comment1.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_comment1.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_comment2.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_comment2.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/auto_comment3.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/auto_comment3.py"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -49,7 +44,7 @@
<entry
key=
"comment"
value=
"59"
/>
<entry
key=
"dummy"
value=
"7"
/>
<entry
key=
"guanshui"
value=
"2"
/>
<entry
key=
"py"
value=
"754
7
"
/>
<entry
key=
"py"
value=
"754
8
"
/>
<entry
key=
"txt"
value=
"86"
/>
<entry
key=
"xuqiu"
value=
"223"
/>
</counts>
...
...
@@ -57,7 +52,7 @@
<usages-collector
id=
"statistics.file.types.edit"
>
<counts>
<entry
key=
"PLAIN_TEXT"
value=
"377"
/>
<entry
key=
"Python"
value=
"754
7
"
/>
<entry
key=
"Python"
value=
"754
8
"
/>
</counts>
</usages-collector>
</session>
...
...
@@ -138,7 +133,7 @@
</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=
"165"
>
...
...
@@ -162,11 +157,11 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/auto_comment1.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-513
"
>
<caret
line=
"1
7"
column=
"29"
lean-forward=
"true"
selection-start-line=
"17"
selection-start-column=
"29"
selection-end-line=
"17"
selection-end-column=
"29
"
/>
<state
relative-caret-position=
"
199
"
>
<caret
line=
"1
5"
column=
"96"
selection-start-line=
"15"
selection-start-column=
"96"
selection-end-line=
"15"
selection-end-column=
"96
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
...
...
@@ -319,12 +314,12 @@
<option
value=
"$PROJECT_DIR$/save_topic_id_comment_three.txt"
/>
<option
value=
"$PROJECT_DIR$/auto_comment3.py"
/>
<option
value=
"$PROJECT_DIR$/auto_comment2.py"
/>
<option
value=
"$PROJECT_DIR$/auto_comment1.py"
/>
<option
value=
"$PROJECT_DIR$/auto_click2.py"
/>
<option
value=
"$PROJECT_DIR$/auto_comment1.py"
/>
</list>
</option>
</component>
<component
name=
"ProjectFrameBounds"
extendedState=
"1"
>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"y"
value=
"23"
/>
<option
name=
"width"
value=
"1280"
/>
<option
name=
"height"
value=
"724"
/>
...
...
@@ -537,21 +532,21 @@
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"0"
y=
"23"
width=
"1280"
height=
"724"
extended-state=
"
1
"
/>
<frame
x=
"0"
y=
"23"
width=
"1280"
height=
"724"
extended-state=
"
0
"
/>
<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
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"2"
sideWeight=
"0.7872763"
visible=
"true"
weight=
"0.17871326"
/>
<window_info
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"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
visible=
"true"
weight=
"0.0"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
weight=
"0.0"
/>
<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
nchor=
"bottom"
id=
"Terminal"
order=
"8"
weight=
"0.027914613
"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"8"
visible=
"true"
weight=
"0.28407225
"
/>
<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"
/>
...
...
@@ -866,20 +861,20 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_c
omment1
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_c
lick2
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-513
"
>
<caret
line=
"1
7"
column=
"29"
lean-forward=
"true"
selection-start-line=
"17"
selection-start-column=
"29"
selection-end-line=
"17"
selection-end-column=
"29
"
/>
<state
relative-caret-position=
"
165
"
>
<caret
line=
"1
1"
lean-forward=
"true"
selection-start-line=
"11"
selection-end-line=
"11
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/auto_c
lick2
.py"
>
<entry
file=
"file://$PROJECT_DIR$/auto_c
omment1
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
65
"
>
<caret
line=
"1
1"
lean-forward=
"true"
selection-start-line=
"11"
selection-end-line=
"11
"
/>
<state
relative-caret-position=
"1
99
"
>
<caret
line=
"1
5"
column=
"96"
selection-start-line=
"15"
selection-start-column=
"96"
selection-end-line=
"15"
selection-end-column=
"96
"
/>
<folding>
<element
signature=
"e#0#11#0"
expanded=
"true"
/>
</folding>
...
...
auto_click1.py
View file @
70c3373d
...
...
@@ -8,12 +8,12 @@ from auto_request import login, click, time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
):
def
get_data
(
numtime
,
numtime2
):
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
)
"SELECT user_id,id FROM topic WHERE is_online=1 and
(create_time > '
%
s' and create_time < '
%
s')"
%
(
numtime
,
numtime2
)
)
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
topic_id_list
=
[]
...
...
@@ -55,8 +55,8 @@ if __name__ == "__main__":
try
:
numtime
=
time_conv
(
10
)
user_id
=
get_data
(
numtime
)
numtime
,
numtime2
=
time_conv
(
15
,
5
)
user_id
=
get_data
(
numtime
,
numtime
)
dicts
=
{}
if
user_id
:
...
...
auto_comment1.py
View file @
70c3373d
...
...
@@ -13,7 +13,7 @@ def get_data(numtime):
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
)
"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
=
[]
...
...
auto_request.py
View file @
70c3373d
...
...
@@ -145,11 +145,12 @@ def reply(cookies_get, id, content):
logging
.
error
(
"catch exception,logins:
%
s"
%
traceback
.
format_exc
())
def
time_conv
(
minutest
):
def
time_conv
(
minutest
,
minutest2
):
try
:
now
=
datetime
.
datetime
.
now
()
yes_time
=
now
-
datetime
.
timedelta
(
minutes
=
minutest
)
return
yes_time
yes_time2
=
now
-
datetime
.
timedelta
(
minutes
=
minutest2
)
return
yes_time
,
yes_time2
except
:
return
None
...
...
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