Change module name
This commit is contained in:
@@ -62,7 +62,7 @@ def main():
|
|||||||
print("You can specify only one video ID.")
|
print("You can specify only one video ID.")
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
SimpleEcho(Arguments().video_ids[0]).run()
|
Echo(Arguments().video_ids[0]).run()
|
||||||
except InvalidVideoIdException as e:
|
except InvalidVideoIdException as e:
|
||||||
print("Invalid video id:", str(e))
|
print("Invalid video id:", str(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import pytchat
|
import pytchat
|
||||||
|
from ..exceptions import ChatDataFinished, NoContents
|
||||||
from ..util.extract_video_id import extract_video_id
|
from ..util.extract_video_id import extract_video_id
|
||||||
|
|
||||||
|
|
||||||
@@ -13,5 +14,9 @@ class Echo:
|
|||||||
for c in chatdata.sync_items():
|
for c in chatdata.sync_items():
|
||||||
print(f"{c.datetime} [{c.author.name}] {c.message} {c.amountString}")
|
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