Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
py12306
Project
Project
Details
Activity
Releases
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
python
py12306
Commits
e788bb03
Commit
e788bb03
authored
Jan 15, 2019
by
littlefatty.wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将配置文件参数SKEY修改为S_KEY以符合参数规则
parent
02b6169b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
env.docker.py.example
env.docker.py.example
+1
-1
env.py.example
env.py.example
+1
-1
app.py
py12306/app.py
+2
-2
config.py
py12306/config.py
+1
-1
order.py
py12306/order/order.py
+2
-2
No files found.
env.docker.py.example
View file @
e788bb03
...
@@ -55,7 +55,7 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
...
@@ -55,7 +55,7 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
# ServerChan和PushBear配置
# ServerChan和PushBear配置
SERVERCHAN_ENABLED = 0
SERVERCHAN_ENABLED = 0
PUSHBEAR_ENABLED = 0
PUSHBEAR_ENABLED = 0
SKEY = 'SCUdafadsfasfdafdf45234234234'
S
_
KEY = 'SCUdafadsfasfdafdf45234234234'
# 输出日志到文件 (Docker 中不建议修改此组配置项)
# 输出日志到文件 (Docker 中不建议修改此组配置项)
OUT_PUT_LOG_TO_FILE_ENABLED = 1
OUT_PUT_LOG_TO_FILE_ENABLED = 1
...
...
env.py.example
View file @
e788bb03
...
@@ -55,7 +55,7 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
...
@@ -55,7 +55,7 @@ TELEGRAM_BOT_API_URL = 'https://tgbot.lbyczf.com/sendMessage/:your_token'
# ServerChan和PushBear配置
# ServerChan和PushBear配置
SERVERCHAN_ENABLED = 0
SERVERCHAN_ENABLED = 0
PUSHBEAR_ENABLED = 0
PUSHBEAR_ENABLED = 0
SKEY = 'SCUdafadsfasfdafdf45234234234'
S
_
KEY = 'SCUdafadsfasfdafdf45234234234'
# 输出日志到文件
# 输出日志到文件
OUT_PUT_LOG_TO_FILE_ENABLED = 0
OUT_PUT_LOG_TO_FILE_ENABLED = 0
...
...
py12306/app.py
View file @
e788bb03
...
@@ -119,11 +119,11 @@ class App:
...
@@ -119,11 +119,11 @@ class App:
if
Config
()
.
SERVERCHAN_ENABLED
:
# ServerChan通知
if
Config
()
.
SERVERCHAN_ENABLED
:
# ServerChan通知
CommonLog
.
add_quick_log
(
CommonLog
.
MESSAGE_TEST_SEND_SERVER_CHAN
)
.
flush
()
CommonLog
.
add_quick_log
(
CommonLog
.
MESSAGE_TEST_SEND_SERVER_CHAN
)
.
flush
()
Notification
.
server_chan
(
Config
()
.
SKEY
,
'测试发送消息'
,
'By py12306'
)
Notification
.
server_chan
(
Config
()
.
S
_
KEY
,
'测试发送消息'
,
'By py12306'
)
if
Config
()
.
PUSHBEAR_ENABLED
:
# PushBear通知
if
Config
()
.
PUSHBEAR_ENABLED
:
# PushBear通知
CommonLog
.
add_quick_log
(
CommonLog
.
MESSAGE_TEST_SEND_PUSH_BEAR
)
.
flush
()
CommonLog
.
add_quick_log
(
CommonLog
.
MESSAGE_TEST_SEND_PUSH_BEAR
)
.
flush
()
Notification
.
push_bear
(
Config
()
.
SKEY
,
'测试发送消息'
,
'By py12306'
)
Notification
.
push_bear
(
Config
()
.
S
_
KEY
,
'测试发送消息'
,
'By py12306'
)
@
classmethod
@
classmethod
def
run_check
(
cls
):
def
run_check
(
cls
):
...
...
py12306/config.py
View file @
e788bb03
...
@@ -65,7 +65,7 @@ class Config:
...
@@ -65,7 +65,7 @@ class Config:
# ServerChan和PushBear配置
# ServerChan和PushBear配置
SERVERCHAN_ENABLED
=
0
SERVERCHAN_ENABLED
=
0
PUSHBEAR_ENABLED
=
0
PUSHBEAR_ENABLED
=
0
SKEY
=
''
S
_
KEY
=
''
# 邮箱配置
# 邮箱配置
EMAIL_ENABLED
=
0
EMAIL_ENABLED
=
0
...
...
py12306/order/order.py
View file @
e788bb03
...
@@ -88,10 +88,10 @@ class Order:
...
@@ -88,10 +88,10 @@ class Order:
Notification
.
send_to_telegram
(
Notification
.
send_to_telegram
(
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT
.
format
(
self
.
order_id
))
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT
.
format
(
self
.
order_id
))
if
Config
()
.
SERVERCHAN_ENABLED
:
# ServerChan通知
if
Config
()
.
SERVERCHAN_ENABLED
:
# ServerChan通知
Notification
.
server_chan
(
Config
()
.
SKEY
,
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE
,
Notification
.
server_chan
(
Config
()
.
S
_
KEY
,
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE
,
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT
.
format
(
self
.
order_id
))
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT
.
format
(
self
.
order_id
))
if
Config
()
.
PUSHBEAR_ENABLED
:
# PushBear通知
if
Config
()
.
PUSHBEAR_ENABLED
:
# PushBear通知
Notification
.
push_bear
(
Config
()
.
SKEY
,
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE
,
Notification
.
push_bear
(
Config
()
.
S
_
KEY
,
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE
,
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT
.
format
(
self
.
order_id
))
OrderLog
.
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_EMAIL_CONTENT
.
format
(
self
.
order_id
))
while
sustain_time
:
# TODO 后面直接查询有没有待支付的订单就可以
while
sustain_time
:
# TODO 后面直接查询有没有待支付的订单就可以
num
+=
1
num
+=
1
...
...
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