Skip to content

Commit

Permalink
更新会员购抢购组件
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsury committed Sep 24, 2018
1 parent 18fa54b commit b318258
Show file tree
Hide file tree
Showing 3 changed files with 2,902 additions and 2,901 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h1 align="center">- Bilibili Toolkit -</h1>

<p align="center">
<img src="https://img.shields.io/badge/version-2018.9.23-green.svg?longCache=true&style=for-the-badge">
<img src="https://img.shields.io/badge/version-2018.9.24-green.svg?longCache=true&style=for-the-badge">
<img src="https://img.shields.io/badge/license-SATA-blue.svg?longCache=true&style=for-the-badge">
</p>

Expand All @@ -30,9 +30,9 @@
|commentPost |2018/8/26 |评论发表 |
|dynamicLike |2018/6/29 |动态点赞 |
|dynamicRepost |2018/6/29 |动态转发 |
|mallRush |2018/9/19 |会员购抢购 |
|mallRush |2018/9/24 |会员购抢购 |
|mallSign |2018/9/19 |会员购周年庆活动签到 |
|mallLottery |2018/9/23 |会员购周年庆活动扭蛋 |
|mallLottery |2018/9/24 |会员购周年庆活动扭蛋 |
|mallPrize |2018/9/19 |会员购周年庆活动中奖查询 |
|liveTool |2018/8/30 |直播助手 |

Expand Down
9 changes: 5 additions & 4 deletions bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__author__ = "Hsury"
__email__ = "i@hsury.com"
__license__ = "SATA"
__version__ = "2018.9.23"
__version__ = "2018.9.24"

class Bilibili():
appKey = "1d8b6e7d45233436"
Expand Down Expand Up @@ -744,7 +744,7 @@ def findAndClick(className):
url = f"{self.protocol}://mall.bilibili.com/mall-c/items/info?itemsId={itemID}"
while True:
response = self.get(url)
if response and response.get("code") == 0 and response['data']['status'] not in [13, 14] and response['data']['activityInfoVO']['serverTime'] >= response['data']['activityInfoVO']['startTime'] if response['data']['activityInfoVO'] else True:
if response and response.get("code") == 0 and response['data']['activityInfoVO']['serverTime'] >= response['data']['activityInfoVO']['startTime'] if response['data']['activityInfoVO'] else True:
break
timestamp = time.time()
inStock = False
Expand Down Expand Up @@ -803,8 +803,8 @@ def mallSign(self):

# 会员购周年庆活动扭蛋
def mallLottery(self):
jackpots = {'A档': 10,
'B档': 11}
jackpots = {'A档': 12,
'B档': 13}
if not (self.info['nickname'] and self.info['face']):
self.query()
url = f"{self.protocol}://mall.bilibili.com/activity/luckydraw"
Expand Down Expand Up @@ -1078,6 +1078,7 @@ def main():
liveToolConfig['task_control']['fetchrule'] = "uper" if config['liveTool']['dailyGiveCoins']['specialUp'] else "bilitop"
liveToolConfig['task_control']['mid'] = config['liveTool']['dailyGiveCoins']['specialUp']
liveToolConfig['other_control']['default_monitor_roomid'] = config['liveTool']['monitorRoom']
liveToolConfig['other_control']['raffle_minitor_roomid'] = 0
with open(os.path.join(liveToolCwd, "config", "user.toml"), "w") as f:
toml.dump(liveToolConfig, f)
with open(os.path.join(liveToolCwd, "config", "ips.toml"), "w") as f:
Expand Down
Loading

0 comments on commit b318258

Please sign in to comment.