Change module name
This commit is contained in:
@@ -62,7 +62,7 @@ def main():
|
||||
print("You can specify only one video ID.")
|
||||
return
|
||||
try:
|
||||
SimpleEcho(Arguments().video_ids[0]).run()
|
||||
Echo(Arguments().video_ids[0]).run()
|
||||
except InvalidVideoIdException as e:
|
||||
print("Invalid video id:", str(e))
|
||||
except Exception as e:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytchat
|
||||
from ..exceptions import ChatDataFinished, NoContents
|
||||
from ..util.extract_video_id import extract_video_id
|
||||
|
||||
|
||||
@@ -12,6 +13,10 @@ class Echo:
|
||||
chatdata = livechat.get()
|
||||
for c in chatdata.sync_items():
|
||||
print(f"{c.datetime} [{c.author.name}] {c.message} {c.amountString}")
|
||||
|
||||
|
||||
|
||||
|
||||
try:
|
||||
livechat.raise_for_status()
|
||||
except (ChatDataFinished, NoContents):
|
||||
print("Chat finished.")
|
||||
except Exception as e:
|
||||
print(type(e), str(e))
|
||||
|
||||
Reference in New Issue
Block a user