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
0a15553d
Commit
0a15553d
authored
Oct 21, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix setting and 解析response
parent
b86d6452
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
auto_reply_per_1d_to_topic.py
vest/reply/auto_reply_per_1d_to_topic.py
+4
-3
auto_reply_per_2h_to_topic.py
vest/reply/auto_reply_per_2h_to_topic.py
+4
-3
auto_request.py
vest/request/auto_request.py
+5
-5
No files found.
vest/reply/auto_reply_per_1d_to_topic.py
View file @
0a15553d
...
...
@@ -42,9 +42,10 @@ def batch_handle(topic_id_list):
response
=
reply_answer
(
cookies
,
topic_id
,
comment1
)
response
=
json
.
loads
(
response
)
cookies
=
login
()
reply_id
=
response
[
"data"
][
"id"
]
time
=
get_rand_time
()
reply2
.
apply_async
(
args
=
(
cookies
,
topic_id
,
comment2
,
reply_id
),
eta
=
time
)
reply_id
=
response
[
"data"
]
.
get
(
'id'
)
if
reply_id
:
time
=
get_rand_time
()
reply2
.
apply_async
(
args
=
(
cookies
,
topic_id
,
comment2
,
reply_id
),
eta
=
time
)
...
...
vest/reply/auto_reply_per_2h_to_topic.py
View file @
0a15553d
...
...
@@ -41,9 +41,10 @@ def batch_handle(topic_id_list):
response
=
reply_answer
(
cookies
,
topic_id
,
comment1
)
response
=
json
.
loads
(
response
)
cookies
=
login
()
reply_id
=
response
[
"data"
][
"id"
]
time
=
get_rand_time
(
hourup
=
0
)
reply2
.
apply_async
(
args
=
(
cookies
,
topic_id
,
comment2
,
reply_id
),
eta
=
time
)
reply_id
=
response
[
"data"
]
.
get
(
'id'
)
if
reply_id
:
time
=
get_rand_time
(
hourup
=
0
)
reply2
.
apply_async
(
args
=
(
cookies
,
topic_id
,
comment2
,
reply_id
),
eta
=
time
)
except
:
logging_exception
()
...
...
vest/request/auto_request.py
View file @
0a15553d
...
...
@@ -122,7 +122,7 @@ def click(cookies_get, id):
return
else
:
click_cache
.
set
(
click_key
,
1
)
click_cache
.
expire
(
click_key
,
settings
.
cache_seconds
)
click_cache
.
expire
(
click_key
,
settings
.
CACHE_SECONDS
)
# 点赞
try
:
...
...
@@ -164,7 +164,7 @@ def reply(cookies_get, id, content):
return
else
:
reply_cache
.
set
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
cache_seconds
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
try
:
post_dict
=
{
'topic_id'
:
id
,
...
...
@@ -295,7 +295,7 @@ def follow(cookies_get, id):
return
else
:
follow_cache
.
set
(
follow_key
,
1
)
follow_cache
.
expire
(
follow_key
,
settings
.
cache_seconds
)
follow_cache
.
expire
(
follow_key
,
settings
.
CACHE_SECONDS
)
try
:
post_dict
=
{
'type'
:
1
,
...
...
@@ -468,7 +468,7 @@ def reply2(cookies_get, id, content, replied_id):
return
else
:
reply_cache
.
set
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
cache_seconds
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
try
:
post_dict
=
{
'topic_id'
:
id
,
...
...
@@ -496,7 +496,7 @@ def pictorial_reply(cookies_get, id, content):
return
else
:
reply_cache
.
set
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
cache_seconds
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
try
:
post_dict
=
{
'pictorial_id'
:
id
,
...
...
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