Skip to content

Commit

Permalink
添加支付密码配置
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghyw committed Dec 23, 2020
1 parent 0bdd686 commit 06294f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ DEFAULT_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKi
# 是否使用随机 useragent,默认为 false
random_useragent = false

[account]
# 支付密码
# 如果你的账户中有可用的京券(注意不是东券)或 在上次购买订单中使用了京豆,
# 那么京东可能会在下单时自动选择京券支付 或 自动勾选京豆支付。
# 此时下单会要求输入六位数字的支付密码。请在下方配置你的支付密码,如 123456 。
# 如果没有上述情况,下方请留空。
payment_pwd = ""

[messenger]
# 使用了Server酱的推送服务
# 如果想开启下单成功后消息推送,则将 enable 设置为 true,默认为 false 不开启推送
Expand Down
3 changes: 2 additions & 1 deletion jd_spider_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def _get_seckill_order_data(self):
'invoicePhone': invoice_info.get('invoicePhone', ''),
'invoicePhoneKey': invoice_info.get('invoicePhoneKey', ''),
'invoice': 'true' if invoice_info else 'false',
'password': '',
'password': global_config.get('account', 'payment_pwd'),
'codTimeType': 3,
'paymentType': 4,
'areaCode': '',
Expand All @@ -560,6 +560,7 @@ def _get_seckill_order_data(self):
'token': token,
'pru': ''
}

return data

def submit_seckill_order(self):
Expand Down

0 comments on commit 06294f3

Please sign in to comment.