Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
暂时解决验证码问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawnnnnnn committed Apr 4, 2018
1 parent 8a6cf45 commit 34d76ba
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 216 deletions.
4 changes: 2 additions & 2 deletions OnlineHeart.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def draw_lottery(self):
temp = response.json()['data']['title']
if "测试" in temp:
print("检测到疑似钓鱼类测试抽奖,默认不参与,请自行判断抽奖可参与性")
print(url)
# print(url)
else:
check = len(response.json()['data']['typeB'])
for g in range(0, check):
Expand All @@ -42,7 +42,7 @@ def draw_lottery(self):
if int(join_end_time) > int(ts) > int(join_start_time):
response1 = bilibili().get_gift_of_lottery(i, g)
print("当前时间:", time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
print("参与抽奖回显:",response1.json())
print("参与实物抽奖回显:",response1.json())
else:
break
else:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@

添加自动清空快到期礼物的功能,添加银瓜子兑换硬币功能
on/off 的配置选项:1代表on,0代表off
4.3:

摸鱼
4.4:

调整架构,加入获取验证码的功能
环境:
------
python3.6
Expand Down
16 changes: 8 additions & 8 deletions Tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import configloader

class Tasks():



def __init__(self):
fileDir = os.path.dirname(os.path.realpath('__file__'))
file_user = fileDir + "/conf/user.conf"
Expand Down Expand Up @@ -63,11 +62,12 @@ def send_gift(self):
if self.dic_user['gift']['on/off'] == '1':
try:
argvs = bilibili().get_bag_list()
giftID = argvs[0][0]
giftNum = argvs[0][1]
bagID = argvs[0][2]
roomID = self.dic_user['gift']['send_to_room']
bilibili().send_bag_gift_web(roomID,giftID,giftNum,bagID)
for i in range(0,len(argvs)):
giftID = argvs[i][0]
giftNum = argvs[i][1]
bagID = argvs[i][2]
roomID = self.dic_user['gift']['send_to_room']
bilibili().send_bag_gift_web(roomID,giftID,giftNum,bagID)
except:
print("# 没有将要过期的礼物~")

Expand All @@ -78,11 +78,11 @@ def sliver2coin(self):
async def run(self):
while 1:
print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), "每日任务")
self.send_gift()
self.sliver2coin()
self.DoSign()
self.Daily_bag()
self.Daily_Task()
self.link_sign()
self.send_gift()
# print('Tasks over.')
await asyncio.sleep(21600)
Loading

0 comments on commit 34d76ba

Please sign in to comment.