You've already forked Douyin_Web_Live
尝试大改,可读性有点差的版本,基本做到能实时处理弹幕
This commit is contained in:
33
output/print.py
Normal file
33
output/print.py
Normal file
@ -0,0 +1,33 @@
|
||||
from colorama import init, Fore
|
||||
|
||||
from output import IOutput
|
||||
|
||||
RED = Fore.RED
|
||||
GREEN = Fore.GREEN
|
||||
BLUE = Fore.BLUE
|
||||
CYAN = Fore.CYAN
|
||||
MAGENTA = Fore.MAGENTA
|
||||
YELLOW = Fore.YELLOW
|
||||
WHITE = Fore.WHITE
|
||||
RESET = Fore.RESET
|
||||
init()
|
||||
|
||||
|
||||
class Print(IOutput):
|
||||
def chat_output(self, msg):
|
||||
print(f"\n{BLUE}[+] {msg} {RESET}")
|
||||
|
||||
def like_output(self, msg):
|
||||
print(f"\n{CYAN}[+] {msg} {RESET}")
|
||||
|
||||
def member_output(self, msg):
|
||||
print(f"\n{RED}[+] {msg} {RESET}")
|
||||
|
||||
def social_output(self, msg):
|
||||
print(f"\n{GREEN}[+] {msg} {RESET}")
|
||||
|
||||
def gift_output(self, msg):
|
||||
print(f"\n{MAGENTA}[+] {msg} {RESET}")
|
||||
|
||||
def userseq_output(self, msg):
|
||||
print(f"\n{YELLOW}[+] {msg} {RESET}")
|
Reference in New Issue
Block a user