Commit Graph

75 Commits

Author SHA1 Message Date
Alessandro Maggio
ec043cace4 Now decision is an empty dict and not None value. Fix bet system 2021-01-30 18:33:07 +01:00
Alessandro Maggio
01233c8c5e isort all import with black profile 2021-01-30 00:14:25 +01:00
Alessandro Maggio
5308e7cf2e claim_drops_startup as request in issue comment https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/21\#issuecomment-770012631
Signed-off-by: Alessandro Maggio <alex.tkd.alex@gmail.com>
2021-01-29 22:14:53 +01:00
Alessandro Maggio
4300213a62 Little bit of refactory 😄 - Each 25% progress print the drop status in logger
Signed-off-by: Alessandro Maggio <alex.tkd.alex@gmail.com>
2021-01-29 22:04:11 +01:00
Alessandro Maggio
508a107c93 Message of type: drop-claim is useless. If current progress is >= required check the drop in inventory and get the dropInstanceID for auto-claim #21
Signed-off-by: Alessandro Maggio <alex.tkd.alex@gmail.com>
2021-01-29 19:36:14 +01:00
Alessandro Maggio
97dee30740 Just fix all of the bugs created in latest code refactory 2021-01-29 17:34:13 +01:00
Alessandro Maggio
13bbe71121 Code refactory. Move all GQLOperations in constats.twitch. Create a folder with all constans and split twitch and browser constants 2021-01-29 15:36:10 +01:00
Alessandro Maggio
af43ffb127 Code refactory. Create a Stream() class. Move the streak values from Streamer to Stream. We should use Streamer for = channel and Stream for the broadcast event 2021-01-29 15:08:23 +01:00
Alessandro Maggio
3bf73f4ea0 Auto claim the drop after message.type == 'drop-claim'
Signed-off-by: Alessandro Maggio <alex.tkd.alex@gmail.com>
2021-01-29 13:36:05 +01:00
Alessandro Maggio
f146038454 Little code refactoring, starting with a good code 😄 Ref #21 2021-01-28 23:40:09 +01:00
Alessandro Maggio
a72a327756 pubsub to drops for get realt-time update. Create a method for claim drops. Insert the game name (if drops are enabled) in minute_watched request. Ref #21 2021-01-28 23:39:36 +01:00
Alessandro Maggio
6e1f74c9c2 Merge pull request #20 from Element21/master
Fix English (hopefully). Use the last version of browser (by user-agent) based on platform or browser settings. Use the same ua for api and browser
2021-01-28 19:13:15 +01:00
Alessandro Maggio
965f3bcd94 Attempt to fix long-running script and reconnecting to websocket 2021-01-27 12:26:04 +01:00
Aiden Marchiori
5812b1ab8a Fix english (hopefully) and update some browsers!
Also added millify to the 'points won' message
2021-01-26 21:06:41 -05:00
Alessandro Maggio
6c6f1579d6 Reported in #15 by @testdev123456 - For moderator users the bet are not avaiable, so check if the viewer is a moderator in bootstrap phase and skip before start betting 2021-01-26 12:01:05 +01:00
Alessandro Maggio
20722c027b Increase time elapsed from stream up to 120s 2021-01-25 22:42:45 +01:00
Alessandro Maggio
d69697f665 Increase stream up timer 2021-01-25 21:37:35 +01:00
Alessandro Maggio
a89d6adb46 attempt to fix the delay of api with stream-up with a single variable 2021-01-25 20:04:01 +01:00
Alessandro Maggio
0764abad99 Merge branch 'master' into watch-streak 2021-01-25 19:40:40 +01:00
Alessandro Maggio
6c587dcd81 Create a single constants.py files. Print offline message only if we are in bootstrap or the use is really offline (prevent api delay and duplicate log message). Move WATCH_STREAK log to DEBUG 2021-01-25 18:55:31 +01:00
Alessandro Maggio
19c755eaf8 Related to: https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/13\#issuecomment-766356146 - TypeError: 'Message' object is not subscriptable 2021-01-24 19:02:54 +01:00
Alessandro Maggio
45b0b06d80 as request in #13 minor fixes & improvements - Add a thousands separator in channel points. Remove 'Streamer:'. Add channel points. Add Streamer name in bet event. Hide claim the bonus. Current status: https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/13#issuecomment-766354652 2021-01-24 15:12:13 +01:00
Alessandro Maggio
ee0882dcf4 Increase to 15m the last pong missing, use the correct message.type for prediction. Boolean ack from websocket, make sure the bet was placed 2021-01-24 12:31:16 +01:00
Alessandro Maggio
04d7c4e272 reduce prediction window for big prediction window 2021-01-24 00:14:31 +01:00
Alessandro Maggio
4e792793e9 fix current_timestamp = parser.parse(message.timestamp) 2021-01-23 23:27:21 +01:00
Alessandro Maggio
16604e2c88 Create a single class Message for handle the json data 2021-01-23 23:13:56 +01:00
Alessandro Maggio
08e460d0e4 In the last commit we have broke everythin, fix get_timestamp, get_channel_id - we have the data in message and not in message_data. Convert timestamp in iso format with utc 2021-01-23 22:53:40 +01:00
Alessandro Maggio
4248ab85c8 Complete message type_channel 2021-01-23 22:13:52 +01:00
Alessandro Maggio
db1efc1d16 fix import 2021-01-23 21:11:36 +01:00
Alessandro Maggio
8e4e30e53c use also servetime as timestamp in isoformat 2021-01-23 21:08:47 +01:00
Alessandro Maggio
f93613bd43 The timestamp is inside message_data 2021-01-23 21:02:11 +01:00
Alessandro Maggio
cd6365b990 use directly the timestamp of pubsub 2021-01-23 20:50:27 +01:00
Alessandro Maggio
cd5171ee28 Check the concatenation between message_type and channel_id for duplicate message. I notice that ofter we skip duplicate message from different channels, special watch_streak in this case. Reduce the time of priority for watch_strek. Now we have the channel_id on top and can also search for streamers in array 2021-01-23 20:46:17 +01:00
Alessandro Maggio
467fb8ecca better 'Watch Streak' strategy in priority system #11 2021-01-23 11:55:06 +01:00
Alessandro Maggio
87da61b01d Use the session for interact with helix api. Again check if the div is open and not close. Reduce the start time for thread if we have lost time to open the div 2021-01-22 18:52:52 +01:00
Alessandro Maggio
a9cf39f286 Improve less logging option #10 2021-01-22 12:46:24 +01:00
Alessandro Maggio
5a8139e836 Less printing as arugments for logger. Request in Issue #10 2021-01-22 11:33:10 +01:00
Alessandro Maggio
f377609b90 Fix for odds percentage. Remove 'for event:' in logs. 2021-01-20 21:55:00 +01:00
Alessandro Maggio
81e5ab2315 Update the README and close #5 2021-01-20 21:55:00 +01:00
Alessandro Maggio
f741e81b82 Black reformatted 2021-01-20 21:55:00 +01:00
Alessandro Maggio
4730a5fa6d Fix indent for if and code refactory 2021-01-20 21:55:00 +01:00
Alessandro Maggio
b0b173068d Make sure that streamer_index != -1 before continue 2021-01-20 21:55:00 +01:00
Alessandro Maggio
2b784d2b9d Do an external control for WebSocket. Check if the thread is running - Something the WebSocket stop to ping - Prevent double emoji in message log file 2021-01-20 11:25:09 +01:00
Alessandro Maggio
88b37a3e18 Just one big big try Exception 2021-01-19 22:42:23 +01:00
Alessandro Maggio
d81d416b5a Black reformatted 2021-01-19 19:16:35 +01:00
Alessandro Maggio
4f26412b19 Create a custom class for logging.Formatter for handle the emoji printing (problem appears on Windows) - Custom settings with log class. Create a method for configure loggers. Ref to #3 2021-01-19 19:16:02 +01:00
Alessandro Maggio
3cba61add2 With big prediction window reduce more time for prevent locked event 2021-01-18 18:29:35 +01:00
Alessandro Maggio
eb1c5fbaed Black reformatted 2021-01-18 15:40:54 +01:00
Alessandro Maggio
d2ff3b976f Seems that after multiple hours of work the Twitch WS stop to answer with PONG message. Save tha last pong and after 5 minutes reconnect all again 2021-01-18 12:53:09 +01:00
Alessandro Maggio
4eaca466d1 Just a little fix for non-user topics (no auth token required) - Set a warning for 50 topics 2021-01-17 16:08:56 +01:00