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
29553b5d
Commit
29553b5d
authored
Dec 08, 2018
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try except
parent
fecd87b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
workspace.xml
.idea/workspace.xml
+0
-0
auto_pick.py
auto_pick.py
+3
-2
auto_star_topic.py
auto_star_topic.py
+3
-3
auto_urge.py
auto_urge.py
+3
-5
No files found.
.idea/workspace.xml
View file @
29553b5d
This diff is collapsed.
Click to expand it.
auto_pick.py
View file @
29553b5d
...
...
@@ -161,7 +161,7 @@ def get_new_user_id(numtime):
db
=
"alpha"
,
port
=
3306
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"select user_id from account_user WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"select user_id from account_user WHERE
is_online =1 and
create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data_new_user
=
cursor
.
fetchall
()
data
=
list
(
data_new_user
)
logging
.
info
(
"Database version :
%
s "
%
data
)
...
...
@@ -181,7 +181,8 @@ def get_star_useid(numtime):
"SELECT user_id FROM topic WHERE content_level =4 or content_level =5 and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
db
.
close
()
return
user_id
except
:
...
...
auto_star_topic.py
View file @
29553b5d
...
...
@@ -134,10 +134,10 @@ def get_star_user_id(numtime):
db
=
"alpha"
,
port
=
3306
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"SELECT user_id FROM topic WHERE content_level =4 or content_level =5 and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
"SELECT user_id FROM topic WHERE
is_online=1 and
content_level =4 or content_level =5 and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
db
.
close
()
return
user_id
except
:
...
...
@@ -153,7 +153,7 @@ def get_star_topic_id(numtime):
"SELECT id FROM topic WHERE is_online=1 and content_level =4 or content_level =5 and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
db
.
close
()
return
user_id
except
:
...
...
auto_urge.py
View file @
29553b5d
...
...
@@ -89,8 +89,6 @@ def Urge(cookies_get, id):
cookies
=
cookies_get
,
data
=
post_dict
)
print
(
response
.
text
,
'url'
)
logging
.
info
(
"response.text:
%
s"
%
response
.
text
)
except
:
...
...
@@ -112,10 +110,10 @@ def get_data(numtime):
db
=
pymysql
.
connect
(
host
=
"rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com"
,
user
=
'work'
,
passwd
=
'Gengmei123'
,
db
=
"alpha"
,
port
=
3306
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"SELECT distinct(user_id) FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT distinct(user_id) FROM topic WHERE
is_online=1 and
create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
db
.
close
()
return
user_id
except
:
...
...
@@ -131,7 +129,7 @@ def get_star_useid(numtime):
"SELECT user_id FROM topic WHERE content_level =4 or content_level =5 and create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
db
.
close
()
return
user_id
except
:
...
...
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