Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
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
钟尚武
physical
Commits
a86710d6
Commit
a86710d6
authored
Aug 10, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add vest
parent
77aba473
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
196 additions
and
212 deletions
+196
-212
misc.xml
.idea/misc.xml
+1
-1
physical.iml
.idea/physical.iml
+1
-1
trans2es_mapping2es.py
trans2es/management/commands/trans2es_mapping2es.py
+68
-1
true_click_five.py
vest/click/true_click_five.py
+3
-6
true_click_four.py
vest/click/true_click_four.py
+7
-10
true_click_one.py
vest/click/true_click_one.py
+7
-7
true_click_three.py
vest/click/true_click_three.py
+3
-4
true_click_two.py
vest/click/true_click_two.py
+3
-4
fix_no_comment_click.py
vest/fix/fix_no_comment_click.py
+4
-7
auto_follow.py
vest/follow/auto_follow.py
+3
-11
auto_follow_new.py
vest/follow/auto_follow_new.py
+3
-7
true_comment_one.py
vest/reply/true_comment_one.py
+3
-6
true_comment_three.py
vest/reply/true_comment_three.py
+3
-5
true_comment_two.py
vest/reply/true_comment_two.py
+3
-6
answer_reply1.py
vest/reply_answer/answer_reply1.py
+4
-6
answer_reply2.py
vest/reply_answer/answer_reply2.py
+3
-5
answer_reply3.py
vest/reply_answer/answer_reply3.py
+3
-6
reply_comment2.py
vest/reply_answer/reply_comment2.py
+2
-4
reply_comment3.py
vest/reply_answer/reply_comment3.py
+3
-5
auto_request.py
vest/request/auto_request.py
+49
-45
auto_user_id.py
vest/request/auto_user_id.py
+1
-2
get_session.py
vest/request/get_session.py
+1
-1
auto_lunch_app.py
vest/urge/auto_lunch_app.py
+3
-20
auto_lunch_app2.py
vest/urge/auto_lunch_app2.py
+3
-18
auto_star_urge.py
vest/urge/auto_star_urge.py
+3
-9
auto_urge1.py
vest/urge/auto_urge1.py
+3
-4
auto_urge2.py
vest/urge/auto_urge2.py
+3
-7
vest_click_reply.py
vest/vest_majiauser/vest_click_reply.py
+3
-4
No files found.
.idea/misc.xml
View file @
a86710d6
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.6 (
physical1
)"
project-jdk-type=
"Python SDK"
/>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.6 (
LiXiaoFang
)"
project-jdk-type=
"Python SDK"
/>
<component
name=
"PyCharmProfessionalAdvertiser"
>
<component
name=
"PyCharmProfessionalAdvertiser"
>
<option
name=
"shown"
value=
"true"
/>
<option
name=
"shown"
value=
"true"
/>
</component>
</component>
...
...
.idea/physical.iml
View file @
a86710d6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.6 (
physical1
)"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.6 (
LiXiaoFang
)"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</component>
<component
name=
"TestRunnerService"
>
<component
name=
"TestRunnerService"
>
...
...
trans2es/management/commands/trans2es_mapping2es.py
View file @
a86710d6
...
@@ -7,6 +7,12 @@ import traceback
...
@@ -7,6 +7,12 @@ import traceback
import
logging
import
logging
from
libs.es
import
ESPerform
from
libs.es
import
ESPerform
from
trans2es.type_info
import
get_type_info_map
,
TypeInfo
from
trans2es.type_info
import
get_type_info_map
,
TypeInfo
from
vest.reply
import
true_comment_one
,
true_comment_two
,
true_comment_three
from
vest.click
import
true_click_five
,
true_click_two
,
true_click_four
,
true_click_one
,
true_click_three
from
vest.follow
import
auto_follow
,
auto_follow_new
from
vest.urge
import
auto_star_urge
,
auto_lunch_app
,
auto_lunch_app2
,
auto_urge1
,
auto_urge2
from
vest.fix
import
fix_no_comment_click
from
vest.reply_answer
import
reply_comment2
,
reply_comment3
,
answer_reply2
,
answer_reply3
,
answer_reply1
class
Command
(
BaseCommand
):
class
Command
(
BaseCommand
):
...
@@ -27,10 +33,14 @@ class Command(BaseCommand):
...
@@ -27,10 +33,14 @@ class Command(BaseCommand):
make_option
(
'-s'
,
'--pks'
,
dest
=
'pks'
,
help
=
'specify sync pks, comma separated'
,
metavar
=
'PKS'
,
default
=
''
),
make_option
(
'-s'
,
'--pks'
,
dest
=
'pks'
,
help
=
'specify sync pks, comma separated'
,
metavar
=
'PKS'
,
default
=
''
),
make_option
(
'--streaming-slicing'
,
dest
=
'streaming_slicing'
,
action
=
'store_true'
,
default
=
True
),
make_option
(
'--streaming-slicing'
,
dest
=
'streaming_slicing'
,
action
=
'store_true'
,
default
=
True
),
make_option
(
'--no-streaming-slicing'
,
dest
=
'streaming_slicing'
,
action
=
'store_false'
,
default
=
True
),
make_option
(
'--no-streaming-slicing'
,
dest
=
'streaming_slicing'
,
action
=
'store_false'
,
default
=
True
),
make_option
(
'-m'
,
'--mvest'
,
dest
=
'mvest'
,
help
=
'mvest reply comment'
,
metavar
=
'MVEST'
),
)
)
def
handle
(
self
,
*
args
,
**
options
):
def
handle
(
self
,
*
args
,
**
options
):
try
:
try
:
logging
.
info
(
"get-------------"
)
es_cli
=
ESPerform
.
get_cli
()
es_cli
=
ESPerform
.
get_cli
()
type_name_list
=
get_type_info_map
()
.
keys
()
type_name_list
=
get_type_info_map
()
.
keys
()
...
@@ -47,7 +57,6 @@ class Command(BaseCommand):
...
@@ -47,7 +57,6 @@ class Command(BaseCommand):
logging
.
info
(
"begin create [
%
s] mapping!"
%
type_name
)
logging
.
info
(
"begin create [
%
s] mapping!"
%
type_name
)
ESPerform
.
put_index_mapping
(
es_cli
,
type_name
,
force_sync
=
True
)
ESPerform
.
put_index_mapping
(
es_cli
,
type_name
,
force_sync
=
True
)
if
len
(
options
[
"indices_template"
]):
if
len
(
options
[
"indices_template"
]):
template_file_name
=
options
[
"indices_template"
]
template_file_name
=
options
[
"indices_template"
]
if
ESPerform
.
put_indices_template
(
es_cli
=
es_cli
,
template_file_name
=
template_file_name
,
if
ESPerform
.
put_indices_template
(
es_cli
=
es_cli
,
template_file_name
=
template_file_name
,
...
@@ -55,5 +64,63 @@ class Command(BaseCommand):
...
@@ -55,5 +64,63 @@ class Command(BaseCommand):
logging
.
info
(
"put indices template suc!"
)
logging
.
info
(
"put indices template suc!"
)
else
:
else
:
logging
.
error
(
"put indices template err!"
)
logging
.
error
(
"put indices template err!"
)
# 点赞
if
options
[
"mvest"
]
==
"true_click_one"
:
true_click_one
.
true_click_one
()
if
options
[
"mvest"
]
==
"true_click_two"
:
true_click_two
.
true_click_two
()
if
options
[
"mvest"
]
==
"true_click_three"
:
true_click_three
.
true_click_three
()
if
options
[
"mvest"
]
==
"true_click_four"
:
true_click_four
.
true_click_four
()
if
options
[
"mvest"
]
==
"true_click_five"
:
true_click_five
.
true_click_five
()
# 评论
if
options
[
"mvest"
]
==
"true_click_one"
:
true_comment_one
.
true_comment_one
()
if
options
[
"mvest"
]
==
"true_click_two"
:
true_comment_two
.
true_comment_two
()
if
options
[
"mvest"
]
==
"true_click_three"
:
true_comment_three
.
true_comment_three
()
# 催更
if
options
[
"mvest"
]
==
"auto_urge1"
:
auto_urge1
.
auto_urge1
()
if
options
[
"mvest"
]
==
"auto_urge2"
:
auto_urge2
.
auto_urge2
()
if
options
[
"mvest"
]
==
"auto_lunch_app"
:
auto_lunch_app
.
auto_lunch_app
()
if
options
[
"mvest"
]
==
"auto_lunch_app2"
:
auto_lunch_app2
.
auto_lunch_app2
()
if
options
[
"mvest"
]
==
"auto_lunch_app2"
:
auto_star_urge
.
auto_star_urge
()
# 关注
if
options
[
"mvest"
]
==
"auto_follow"
:
auto_follow
.
auto_follow
()
if
options
[
"mvest"
]
==
"auto_follow_new"
:
auto_follow_new
.
auto_follow_new
()
# 补足
if
options
[
"mvest"
]
==
"fix_no_comment_click"
:
fix_no_comment_click
.
fix_no_comment_click
()
# 二级评论
if
options
[
"mvest"
]
==
"answer_reply1"
:
answer_reply1
.
answer_reply1
()
if
options
[
"mvest"
]
==
"answer_reply2"
:
answer_reply2
.
answer_reply2
()
if
options
[
"mvest"
]
==
"answer_reply3"
:
answer_reply3
.
answer_reply3
()
if
options
[
"mvest"
]
==
"reply_comment2"
:
reply_comment2
.
reply_comment2
()
if
options
[
"mvest"
]
==
"reply_comment3"
:
reply_comment3
.
reply_comment3
()
except
:
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
vest/click/true_click_five.py
View file @
a86710d6
import
time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
click
,
time_conv
from
vest.request.auto_request
import
login
,
click
,
time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
try
:
try
:
...
@@ -39,7 +36,7 @@ def get_data(numtime, numtime2):
...
@@ -39,7 +36,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_click_five
()
:
try
:
try
:
logging
.
info
(
"click five"
)
logging
.
info
(
"click five"
)
numtime
,
numtime2
=
time_conv
(
51
,
41
)
numtime
,
numtime2
=
time_conv
(
51
,
41
)
...
...
vest/click/true_click_four.py
View file @
a86710d6
import
time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
click
,
time_conv
from
vest.request.
auto_request
import
login
,
click
,
time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -16,7 +14,7 @@ def get_data(numtime, numtime2):
...
@@ -16,7 +14,7 @@ def get_data(numtime, numtime2):
logging
.
info
(
"get numtime2:
%
s"
%
numtime2
)
logging
.
info
(
"get numtime2:
%
s"
%
numtime2
)
cursor
.
execute
(
cursor
.
execute
(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '
%
s' and create_time <= '
%
s')"
%
(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '
%
s' and create_time <= '
%
s')"
%
(
numtime
,
numtime2
))
numtime
,
numtime2
))
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
topic_id
=
list
(
data
)
topic_id_list
=
[]
topic_id_list
=
[]
...
@@ -39,17 +37,17 @@ def get_data(numtime, numtime2):
...
@@ -39,17 +37,17 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_click_four
()
:
try
:
try
:
logging
.
info
(
"click four"
)
logging
.
info
(
"click four"
)
numtime
,
numtime2
=
time_conv
(
47
,
37
)
numtime
,
numtime2
=
time_conv
(
47
,
37
)
user_id
=
get_data
(
numtime
,
numtime2
)
user_id
=
get_data
(
numtime
,
numtime2
)
dicts
=
{}
dicts
=
{}
for
i
in
user_id
:
for
i
in
user_id
:
rand_num
=
random
.
randint
(
0
,
1
)
rand_num
=
random
.
randint
(
0
,
1
)
if
rand_num
==
1
:
if
rand_num
==
1
:
cook
=
login
()
cook
=
login
()
if
cook
is
not
None
:
if
cook
is
not
None
:
click
(
cook
,
i
[
1
])
click
(
cook
,
i
[
1
])
except
:
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
\ No newline at end of file
vest/click/true_click_one.py
View file @
a86710d6
...
@@ -2,10 +2,9 @@ import time
...
@@ -2,10 +2,9 @@ import time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
click
,
time_conv
from
vest.request.
auto_request
import
login
,
click
,
time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -39,14 +38,16 @@ def get_data(numtime, numtime2):
...
@@ -39,14 +38,16 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_click_one
()
:
try
:
try
:
numtime
,
numtime2
=
time_conv
(
5
,
0
)
numtime
,
numtime2
=
time_conv
(
5
,
0
)
user_id
=
get_data
(
numtime
,
numtime2
)
user_id
=
get_data
(
numtime
,
numtime2
)
dicts
=
{}
dicts
=
{}
for
i
in
user_id
:
for
i
in
user_id
:
cook
=
login
()
cook
=
login
()
if
cook
is
not
None
:
if
cook
is
not
None
:
click
(
cook
,
i
[
1
])
click
(
cook
,
i
[
1
])
except
:
except
:
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
\ No newline at end of file
vest/click/true_click_three.py
View file @
a86710d6
...
@@ -2,10 +2,9 @@ import time
...
@@ -2,10 +2,9 @@ import time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
click
,
time_conv
from
vest.request.
auto_request
import
login
,
click
,
time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -39,7 +38,7 @@ def get_data(numtime, numtime2):
...
@@ -39,7 +38,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_click_three
()
:
try
:
try
:
logging
.
info
(
"click three"
)
logging
.
info
(
"click three"
)
numtime
,
numtime2
=
time_conv
(
45
,
35
)
numtime
,
numtime2
=
time_conv
(
45
,
35
)
...
...
vest/click/true_click_two.py
View file @
a86710d6
...
@@ -2,10 +2,9 @@ import time
...
@@ -2,10 +2,9 @@ import time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
click
,
time_conv
from
vest.request.
auto_request
import
login
,
click
,
time_conv
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -39,7 +38,7 @@ def get_data(numtime, numtime2):
...
@@ -39,7 +38,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_click_two
()
:
try
:
try
:
numtime
,
numtime2
=
time_conv
(
27
,
17
)
numtime
,
numtime2
=
time_conv
(
27
,
17
)
user_id
=
get_data
(
numtime
,
numtime2
)
user_id
=
get_data
(
numtime
,
numtime2
)
...
...
vest/fix/fix_no_comment_click.py
View file @
a86710d6
...
@@ -5,10 +5,8 @@ import pymysql
...
@@ -5,10 +5,8 @@ import pymysql
import
random
import
random
import
traceback
import
traceback
import
logging
import
logging
from
log_settings
import
*
from
vest.request.auto_request
import
login
,
time_convs
,
reply
,
get_comment
,
click
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
from
auto_request
import
login
,
time_convs
,
reply
,
get_comment
,
click
from
auto_request
import
host
,
user
,
db
,
passwd
def
get_topic_id
(
numtime1
,
numtime2
):
def
get_topic_id
(
numtime1
,
numtime2
):
...
@@ -18,7 +16,7 @@ def get_topic_id(numtime1, numtime2):
...
@@ -18,7 +16,7 @@ def get_topic_id(numtime1, numtime2):
cursor
.
execute
(
cursor
.
execute
(
"SELECT id,user_id FROM topic WHERE is_online=1 and create_time > '
%
s' and create_time < '
%
s' and id not in "
"SELECT id,user_id FROM topic WHERE is_online=1 and create_time > '
%
s' and create_time < '
%
s' and id not in "
"(select topic_id from reply where create_time > '
%
s' and create_time < '
%
s')"
%
(
"(select topic_id from reply where create_time > '
%
s' and create_time < '
%
s')"
%
(
numtime1
,
numtime2
,
numtime1
,
numtime2
)
numtime1
,
numtime2
,
numtime1
,
numtime2
)
)
)
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
topic_id
=
list
(
data
)
topic_id
=
list
(
data
)
...
@@ -31,8 +29,7 @@ def get_topic_id(numtime1, numtime2):
...
@@ -31,8 +29,7 @@ def get_topic_id(numtime1, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
fix_no_comment_click
():
try
:
try
:
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
user_id
=
get_topic_id
(
numtime1
,
numtime2
)
user_id
=
get_topic_id
(
numtime1
,
numtime2
)
...
...
vest/follow/auto_follow.py
View file @
a86710d6
import
requests
import
time
import
datetime
import
pymysql
import
pymysql
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
follow
from
vest.request.
auto_request
import
login
,
time_convs
,
follow
from
auto_request
import
host
,
user
,
port
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
port
,
db
,
passwd
def
get_data
(
numtime1
,
numtime2
):
def
get_data
(
numtime1
,
numtime2
):
...
@@ -36,12 +31,9 @@ def get_data(numtime1, numtime2):
...
@@ -36,12 +31,9 @@ def get_data(numtime1, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
auto_follow
():
try
:
try
:
time_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
user_id
=
get_data
(
numtime1
,
numtime2
)
user_id
=
get_data
(
numtime1
,
numtime2
)
...
...
vest/follow/auto_follow_new.py
View file @
a86710d6
import
requests
import
time
import
time
import
datetime
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
follow
from
vest.request.
auto_request
import
login
,
time_convs
,
follow
from
auto_request
import
host
,
user
,
port
,
db
,
passwd
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
def
get_commnet_id
(
numtime
):
def
get_commnet_id
(
numtime
):
...
@@ -97,8 +94,7 @@ def get_commnet_id(numtime):
...
@@ -97,8 +94,7 @@ def get_commnet_id(numtime):
return
topic_id_list
return
topic_id_list
if
__name__
==
"__main__"
:
def
auto_follow_new
():
try
:
try
:
numtime1
,
numtime2
=
time_convs
(
1
,
2
)
numtime1
,
numtime2
=
time_convs
(
1
,
2
)
...
...
vest/reply/true_comment_one.py
View file @
a86710d6
import
pymysql
import
pymysql
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_conv
,
get_comment
,
reply
from
vest.request.
auto_request
import
login
,
time_conv
,
get_comment
,
reply
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -40,8 +38,7 @@ def get_data(numtime, numtime2):
...
@@ -40,8 +38,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_comment_one
():
try
:
try
:
logging
.
info
(
"comment one"
)
logging
.
info
(
"comment one"
)
numtime1
,
numtime2
=
time_conv
(
5
,
0
)
numtime1
,
numtime2
=
time_conv
(
5
,
0
)
...
...
vest/reply/true_comment_three.py
View file @
a86710d6
...
@@ -2,10 +2,9 @@ import time
...
@@ -2,10 +2,9 @@ import time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_conv
,
get_comment
,
reply
from
vest.request.
auto_request
import
login
,
time_conv
,
get_comment
,
reply
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -41,8 +40,7 @@ def get_data(numtime, numtime2):
...
@@ -41,8 +40,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_comment_three
():
try
:
try
:
logging
.
info
(
" commend three"
)
logging
.
info
(
" commend three"
)
numtime1
,
numtime2
=
time_conv
(
45
,
35
)
numtime1
,
numtime2
=
time_conv
(
45
,
35
)
...
...
vest/reply/true_comment_two.py
View file @
a86710d6
import
time
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_conv
,
get_comment
,
reply
from
vest.request.
auto_request
import
login
,
time_conv
,
get_comment
,
reply
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -41,8 +39,7 @@ def get_data(numtime, numtime2):
...
@@ -41,8 +39,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
true_comment_two
():
try
:
try
:
logging
.
info
(
"comment two"
)
logging
.
info
(
"comment two"
)
numtime1
,
numtime2
=
time_conv
(
27
,
17
)
numtime1
,
numtime2
=
time_conv
(
27
,
17
)
...
...
vest/reply_answer/answer_reply1.py
View file @
a86710d6
import
pymysql
import
pymysql
import
traceback
import
traceback
import
logging
import
logging
import
datetime
import
json
import
json
from
log_settings
import
*
from
vest.request.auto_request
import
time_conv_minute
,
get_answer_data
,
reply_answer
,
set_reply_to_redis
,
\
from
auto_request
import
login
,
time_conv_minute
,
get_answer_data
,
reply_answer
,
set_reply_to_redis
,
reply2
,
logins
,
\
reply2
,
logins
,
\
get_majia
,
get_majia_reply
get_majia
,
get_majia_reply
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -40,8 +39,7 @@ def get_data(numtime, numtime2):
...
@@ -40,8 +39,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
answer_reply1
():
try
:
try
:
logging
.
info
(
"comment answer one"
)
logging
.
info
(
"comment answer one"
)
numtime1
,
numtime2
,
minute
=
time_conv_minute
(
5
,
0
)
numtime1
,
numtime2
,
minute
=
time_conv_minute
(
5
,
0
)
...
...
vest/reply_answer/answer_reply2.py
View file @
a86710d6
...
@@ -2,10 +2,9 @@ import pymysql
...
@@ -2,10 +2,9 @@ import pymysql
import
traceback
import
traceback
import
logging
import
logging
import
json
import
json
from
log_settings
import
*
from
vest.request.auto_request
import
logins
,
time_conv
,
get_answer_data
,
reply_answer
,
get_majia
,
\
from
auto_request
import
logins
,
reply
,
get_comment
,
time_conv
,
get_answer_data
,
reply_answer
,
get_majia
,
\
set_reply_to_redis
set_reply_to_redis
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -40,8 +39,7 @@ def get_data(numtime, numtime2):
...
@@ -40,8 +39,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
answer_reply2
():
try
:
try
:
logging
.
info
(
"comment answer one"
)
logging
.
info
(
"comment answer one"
)
numtime1
,
numtime2
=
time_conv
(
27
,
17
)
numtime1
,
numtime2
=
time_conv
(
27
,
17
)
...
...
vest/reply_answer/answer_reply3.py
View file @
a86710d6
...
@@ -2,10 +2,8 @@ import pymysql
...
@@ -2,10 +2,8 @@ import pymysql
import
traceback
import
traceback
import
logging
import
logging
import
json
import
json
from
log_settings
import
*
from
vest.request.auto_request
import
logins
,
time_conv
,
get_answer_data
,
reply_answer
,
set_reply_to_redis
,
get_majia
from
auto_request
import
logins
,
reply
,
get_comment
,
time_conv
,
get_answer_data
,
reply_answer
,
set_reply_to_redis
,
\
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
get_majia
from
auto_request
import
host
,
user
,
db
,
passwd
def
get_data
(
numtime
,
numtime2
):
def
get_data
(
numtime
,
numtime2
):
...
@@ -40,8 +38,7 @@ def get_data(numtime, numtime2):
...
@@ -40,8 +38,7 @@ def get_data(numtime, numtime2):
return
[]
return
[]
if
__name__
==
"__main__"
:
def
answer_reply3
():
try
:
try
:
logging
.
info
(
"comment answer one"
)
logging
.
info
(
"comment answer one"
)
numtime1
,
numtime2
=
time_conv
(
45
,
35
)
numtime1
,
numtime2
=
time_conv
(
45
,
35
)
...
...
vest/reply_answer/reply_comment2.py
View file @
a86710d6
import
traceback
import
traceback
import
redis
import
logging
import
logging
import
json
import
json
from
log_settings
import
*
from
vest.request.auto_request
import
set_reply_to_redis
,
reply2
,
logins
,
get_majia_reply
from
auto_request
import
set_reply_to_redis
,
reply2
,
logins
,
get_majia_reply
if
__name__
==
"__main__"
:
def
reply_comment2
():
try
:
try
:
redis_key1
=
"cybertron:set_reply_id:two"
redis_key1
=
"cybertron:set_reply_id:two"
redis_client
=
set_reply_to_redis
()
redis_client
=
set_reply_to_redis
()
...
...
vest/reply_answer/reply_comment3.py
View file @
a86710d6
import
traceback
import
traceback
import
redis
import
logging
import
json
import
json
from
log_settings
import
*
import
logging
from
auto_request
import
set_reply_to_redis
,
reply2
,
logins
,
get_majia_reply
from
vest.request.auto_request
import
set_reply_to_redis
,
reply2
,
logins
,
get_majia_reply
if
__name__
==
"__main__"
:
def
reply_comment3
():
try
:
try
:
redis_key1
=
"cybertron:set_reply_id:three"
redis_key1
=
"cybertron:set_reply_id:three"
redis_client
=
set_reply_to_redis
()
redis_client
=
set_reply_to_redis
()
...
...
vest/request/auto_request.py
View file @
a86710d6
...
@@ -4,37 +4,56 @@ import datetime
...
@@ -4,37 +4,56 @@ import datetime
import
random
import
random
import
traceback
import
traceback
import
logging
import
logging
import
log_settings
import
json
import
json
import
redis
import
redis
import
smtplib
import
smtplib
from
email.mime.text
import
MIMEText
from
email.mime.text
import
MIMEText
from
email.utils
import
formataddr
from
email.utils
import
formataddr
from
collections
import
Counter
from
physical.settings_local
import
DATABASES
my_sender
=
'lixiaofang@igengmei.com'
my_sender
=
'lixiaofang@igengmei.com'
my_pass
=
'tg5AVKBB8jLQGBET'
my_pass
=
'tg5AVKBB8jLQGBET'
my_user6
=
"lixiaofang@igengmei.com"
my_user6
=
"lixiaofang@igengmei.com"
auto_click_url
=
"http://earth.iyanzhi.com/api/v1/like"
auto_click_url
=
"http://earth.gmapp.env/api/v1/like"
auto_reply_url
=
"http://earth.iyanzhi.com/api/v1/reply/create"
auto_reply_url
=
"http://earth.gmapp.env/api/v1/reply/create"
auto_follow_url
=
"http://earth.iyanzhi.com/api/v1/follow"
auto_follow_url
=
"http://earth.gmapp.env/api/v1/follow"
auto_urge_url
=
"http://earth.iyanzhi.com/api/v1/user/urge"
auto_urge_url
=
"http://earth.gmapp.env/api/v1/user/urge"
DATABASES
=
{
# DATABASES = {
'default'
:
{
# 'default': {
'ENGINE'
:
'django.db.backends.mysql'
,
# 'ENGINE': 'django.db.backends.mysql',
'NAME'
:
'alpha'
,
# 'NAME': 'alpha',
'USER'
:
'work'
,
# 'USER': 'work',
'PASSWORD'
:
'oars152!traipseize738'
,
# 'PASSWORD': 'Gengmei123!',
'HOST'
:
'172.17.40.136'
,
# 'HOST': 'bj-cdb-55ejhsjy.sql.tencentcdb.com',
'PORT'
:
'3306'
,
# 'PORT': '62177',
'OPTIONS'
:
{
# 'OPTIONS': {
"init_command"
:
"SET foreign_key_checks = 0;"
,
# "init_command": "SET foreign_key_checks = 0;",
"charset"
:
"utf8mb4"
,
# "charset": "utf8mb4",
}
# },
}
# }
}
# }
# auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
# auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
# auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'alpha',
# 'USER': 'work',
# 'PASSWORD': 'oars152!traipseize738',
# 'HOST': '172.17.40.136',
# 'PORT': '3306',
# 'OPTIONS': {
# "init_command": "SET foreign_key_checks = 0;",
# "charset": "utf8mb4",
# }
# }
# }
host
=
DATABASES
[
'default'
][
'HOST'
]
host
=
DATABASES
[
'default'
][
'HOST'
]
...
@@ -49,7 +68,7 @@ passwd = DATABASES['default']['PASSWORD']
...
@@ -49,7 +68,7 @@ passwd = DATABASES['default']['PASSWORD']
def
get_majia_reply
(
user_id
):
def
get_majia_reply
(
user_id
):
try
:
try
:
data
=
open
(
"/srv/apps/
cybertron/batch_user_gen
"
)
data
=
open
(
"/srv/apps/
physical/vest_user_email.txt
"
)
list
=
[]
list
=
[]
for
i
in
data
:
for
i
in
data
:
if
i
!=
user_id
:
if
i
!=
user_id
:
...
@@ -66,7 +85,7 @@ def get_majia_reply(user_id):
...
@@ -66,7 +85,7 @@ def get_majia_reply(user_id):
def
get_majia
():
def
get_majia
():
try
:
try
:
data
=
open
(
"/srv/apps/
cybertron/batch_user_gen
"
)
data
=
open
(
"/srv/apps/
physical/vest_user_email.txt
"
)
list
=
[]
list
=
[]
for
i
in
data
:
for
i
in
data
:
list
.
append
(
i
.
strip
(
'
\n
'
)
.
strip
(
','
))
list
.
append
(
i
.
strip
(
'
\n
'
)
.
strip
(
','
))
...
@@ -81,7 +100,7 @@ def get_majia():
...
@@ -81,7 +100,7 @@ def get_majia():
def
get_cookies
(
user_id
):
def
get_cookies
(
user_id
):
try
:
try
:
with
open
(
"/data/log/
cybertron
/app/user_session.txt"
,
'r'
)
as
f
:
with
open
(
"/data/log/
physical
/app/user_session.txt"
,
'r'
)
as
f
:
try
:
try
:
data
=
f
.
readlines
()
data
=
f
.
readlines
()
except
:
except
:
...
@@ -214,7 +233,7 @@ def time_convs(numtime, numtime2):
...
@@ -214,7 +233,7 @@ def time_convs(numtime, numtime2):
def
get_comment
():
def
get_comment
():
try
:
try
:
data
=
open
(
"/srv/apps/
cybertron/guanshui
"
,
"r"
)
data
=
open
(
"/srv/apps/
physical/guanshui.txt
"
,
"r"
)
list_guanshui
=
[]
list_guanshui
=
[]
for
i
in
data
:
for
i
in
data
:
list_guanshui
.
append
(
i
)
list_guanshui
.
append
(
i
)
...
@@ -232,7 +251,7 @@ def get_comment():
...
@@ -232,7 +251,7 @@ def get_comment():
def
get_comments
():
def
get_comments
():
try
:
try
:
data
=
open
(
"/srv/apps/
cybertron/guanshui
"
,
"r"
)
data
=
open
(
"/srv/apps/
physical/guanshui.txt
"
,
"r"
)
list_guanshui
=
[]
list_guanshui
=
[]
for
i
in
data
:
for
i
in
data
:
list_guanshui
.
append
(
i
)
list_guanshui
.
append
(
i
)
...
@@ -289,7 +308,7 @@ def Urge(cookies_get, id):
...
@@ -289,7 +308,7 @@ def Urge(cookies_get, id):
def
get_offline_comment
():
def
get_offline_comment
():
try
:
try
:
data
=
open
(
"/srv/apps/
cybertron
/comment.txt"
,
"r"
)
data
=
open
(
"/srv/apps/
physical
/comment.txt"
,
"r"
)
list_guanshui
=
[]
list_guanshui
=
[]
for
i
in
data
:
for
i
in
data
:
...
@@ -312,23 +331,8 @@ def get_offline_comment():
...
@@ -312,23 +331,8 @@ def get_offline_comment():
return
None
return
None
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
def
get_user_id
():
def
get_user_id
():
user_data
=
open
(
"/
data/log/cybertron/app
/user_id.txt"
,
"r"
)
user_data
=
open
(
"/
srv/apps/physical
/user_id.txt"
,
"r"
)
user_list
=
[]
user_list
=
[]
for
i
in
user_data
.
readlines
():
for
i
in
user_data
.
readlines
():
...
@@ -378,7 +382,7 @@ def get_answer_data():
...
@@ -378,7 +382,7 @@ def get_answer_data():
try
:
try
:
# 获取第一条评论
# 获取第一条评论
data
=
open
(
"/srv/apps/
cybertron/answer
1.txt"
,
"r"
)
data
=
open
(
"/srv/apps/
physical/reply_answer_data
1.txt"
,
"r"
)
answer_data1
=
[]
answer_data1
=
[]
for
i
in
data
:
for
i
in
data
:
...
@@ -388,7 +392,7 @@ def get_answer_data():
...
@@ -388,7 +392,7 @@ def get_answer_data():
comment1
=
answer_data1
[
num1
-
1
]
comment1
=
answer_data1
[
num1
-
1
]
# 获取第二条评论
# 获取第二条评论
data
=
open
(
"/srv/apps/
cybertron/answer
2.txt"
,
"r"
)
data
=
open
(
"/srv/apps/
physical/reply_answer_data
2.txt"
,
"r"
)
answer_data2
=
[]
answer_data2
=
[]
for
i
in
data
:
for
i
in
data
:
...
...
vest/request/auto_user_id.py
View file @
a86710d6
import
pymysql
import
pymysql
import
traceback
import
traceback
import
logging
import
logging
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.auto_request
import
host
,
user
,
db
,
passwd
from
log_settings
import
*
def
get_data
():
def
get_data
():
...
...
vest/request/get_session.py
View file @
a86710d6
...
@@ -2,7 +2,7 @@ import requests
...
@@ -2,7 +2,7 @@ import requests
import
traceback
import
traceback
import
logging
import
logging
login_url
=
"http://earth.
gmapp.env
/api/account/login_pwd"
login_url
=
"http://earth.
iyanzhi.com
/api/account/login_pwd"
def
index_first
():
def
index_first
():
...
...
vest/urge/auto_lunch_app.py
View file @
a86710d6
import
requests
import
time
import
datetime
import
pymysql
import
pymysql
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
follow
,
Urge
from
vest.request.auto_request
import
login
,
time_convs
,
Urge
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.auto_request
import
host
,
user
,
passwd
def
get_data
(
numtime
):
def
get_data
(
numtime
):
...
@@ -19,18 +14,6 @@ def get_data(numtime):
...
@@ -19,18 +14,6 @@ def get_data(numtime):
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
# topic_id_list = []
# for i in user_id and user_id:
# pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
# cursor = pc.cursor()
# 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
()
pc
.
close
()
return
user_id
return
user_id
except
:
except
:
...
@@ -38,7 +21,7 @@ def get_data(numtime):
...
@@ -38,7 +21,7 @@ def get_data(numtime):
return
None
return
None
if
__name__
==
"__main__"
:
def
auto_lunch_app
()
:
try
:
try
:
numtime1
,
numtime2
=
time_convs
(
1
,
3
)
numtime1
,
numtime2
=
time_convs
(
1
,
3
)
user_id
=
get_data
(
numtime2
)
user_id
=
get_data
(
numtime2
)
...
...
vest/urge/auto_lunch_app2.py
View file @
a86710d6
import
requests
import
time
import
datetime
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
follow
,
Urge
from
vest.request.auto_request
import
login
,
time_convs
,
Urge
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.auto_request
import
host
,
user
,
passwd
def
get_data
(
numtime
):
def
get_data
(
numtime
):
...
@@ -18,17 +14,6 @@ def get_data(numtime):
...
@@ -18,17 +14,6 @@ def get_data(numtime):
"select user_id from sl_user_login_status where last_visit_day < '
%
s' and is_shadow = 0 "
%
numtime
)
"select user_id from sl_user_login_status where last_visit_day < '
%
s' and is_shadow = 0 "
%
numtime
)
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
user_id
=
list
(
data
)
# topic_id_list = []
# for i in user_id and user_id:
# pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
# cursor = pc.cursor()
# 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 "
%
user_id
)
logging
.
info
(
"Database version :
%
s "
%
user_id
)
pc
.
close
()
pc
.
close
()
return
user_id
return
user_id
...
@@ -37,7 +22,7 @@ def get_data(numtime):
...
@@ -37,7 +22,7 @@ def get_data(numtime):
return
None
return
None
if
__name__
==
"__main__"
:
def
auto_lunch_app2
()
:
try
:
try
:
numtime1
,
numtime2
=
time_convs
(
1
,
3
)
numtime1
,
numtime2
=
time_convs
(
1
,
3
)
user_id
=
get_data
(
numtime2
)
user_id
=
get_data
(
numtime2
)
...
...
vest/urge/auto_star_urge.py
View file @
a86710d6
import
requests
import
time
import
datetime
import
pymysql
import
pymysql
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
Urge
from
vest.request.
auto_request
import
login
,
time_convs
,
Urge
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
def
get_star_useid
(
numtime1
,
numtime2
):
def
get_star_useid
(
numtime1
,
numtime2
):
...
@@ -36,8 +31,7 @@ def get_star_useid(numtime1, numtime2):
...
@@ -36,8 +31,7 @@ def get_star_useid(numtime1, numtime2):
return
None
return
None
if
__name__
==
"__main__"
:
def
auto_star_urge
():
try
:
try
:
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
user_id
=
get_star_useid
(
numtime1
,
numtime2
)
user_id
=
get_star_useid
(
numtime1
,
numtime2
)
...
...
vest/urge/auto_urge1.py
View file @
a86710d6
...
@@ -4,10 +4,9 @@ import datetime
...
@@ -4,10 +4,9 @@ import datetime
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
Urge
from
vest.request.
auto_request
import
login
,
time_convs
,
Urge
from
auto_request
import
host
,
port
,
passwd
,
user
,
db
from
vest.request.
auto_request
import
host
,
port
,
passwd
,
user
,
db
import
threading
import
threading
...
@@ -38,7 +37,7 @@ def get_data(numtime1, numtime2):
...
@@ -38,7 +37,7 @@ def get_data(numtime1, numtime2):
return
None
return
None
if
__name__
==
"__main__"
:
def
auto_urge1
()
:
try
:
try
:
time_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
time_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
...
...
vest/urge/auto_urge2.py
View file @
a86710d6
import
requests
import
time
import
datetime
import
pymysql
import
pymysql
import
random
import
random
import
traceback
import
traceback
from
log_settings
import
*
import
logging
import
logging
from
auto_request
import
login
,
time_convs
,
Urge
from
vest.request.
auto_request
import
login
,
time_convs
,
Urge
from
auto_request
import
host
,
port
,
passwd
,
user
,
db
from
vest.request.
auto_request
import
host
,
port
,
passwd
,
user
,
db
import
threading
import
threading
...
@@ -38,7 +34,7 @@ def get_data(numtime1, numtime2):
...
@@ -38,7 +34,7 @@ def get_data(numtime1, numtime2):
return
None
return
None
if
__name__
==
"__main__"
:
def
auto_urge2
()
:
try
:
try
:
time_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
time_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
]
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
numtime1
,
numtime2
=
time_convs
(
8
,
0
)
...
...
vest/vest_majiauser/vest_click_reply.py
View file @
a86710d6
import
requests
import
requests
import
pymysql
import
pymysql
import
random
import
random
from
log_settings
import
*
import
traceback
import
traceback
import
logging
import
logging
import
datetime
import
datetime
from
auto_request
import
get_offline_comment
from
vest.request.
auto_request
import
get_offline_comment
from
auto_request
import
host
,
user
,
db
,
passwd
from
vest.request.
auto_request
import
host
,
user
,
db
,
passwd
auto_reply_url
=
"http://saturn.iyanzhi.com/api/v1/reply/create_for_inner"
auto_reply_url
=
"http://saturn.iyanzhi.com/api/v1/reply/create_for_inner"
...
@@ -60,7 +59,7 @@ if __name__ == "__main__":
...
@@ -60,7 +59,7 @@ if __name__ == "__main__":
now
=
datetime
.
datetime
.
now
()
now
=
datetime
.
datetime
.
now
()
yes_time
=
now
-
datetime
.
timedelta
(
minutes
=
5
)
yes_time
=
now
-
datetime
.
timedelta
(
minutes
=
5
)
user_data
=
open
(
"/data/log/
cybertron
/app/user_id.txt"
,
"r"
)
user_data
=
open
(
"/data/log/
physical
/app/user_id.txt"
,
"r"
)
user_list
=
[]
user_list
=
[]
for
i
in
user_data
.
readlines
():
for
i
in
user_data
.
readlines
():
user_list
.
append
(
i
)
user_list
.
append
(
i
)
...
...
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