diff --git a/README.md b/README.md index e8057cf..e60adc3 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ while chat.is_alive(): ### asyncio context: ```python from pytchat import LiveChatAsync +from concurrent.futures import CancelledError import asyncio async def main(): diff --git a/pytchat/__init__.py b/pytchat/__init__.py index 92ce6f7..c9d3131 100644 --- a/pytchat/__init__.py +++ b/pytchat/__init__.py @@ -2,7 +2,7 @@ pytchat is a python library for fetching youtube live chat without using yt api, Selenium, or BeautifulSoup. """ __copyright__ = 'Copyright (C) 2019 taizan-hokuto' -__version__ = '0.0.4.1' +__version__ = '0.0.4.2' __license__ = 'MIT' __author__ = 'taizan-hokuto' __author_email__ = '55448286+taizan-hokuto@users.noreply.github.com' diff --git a/pytchat/processors/combinator.py b/pytchat/processors/combinator.py index 1b76df5..c3a81b7 100644 --- a/pytchat/processors/combinator.py +++ b/pytchat/processors/combinator.py @@ -7,7 +7,7 @@ class Combinator(ChatProcessor): For example: [constructor] - chat = LiveChat("video_id", processor = ( Processor1(), Processor2(), Processor3() ) + chat = LiveChat("video_id", processor = ( Processor1(), Processor2(), Processor3() ) ) [receive return values] ret1, ret2, ret3 = chat.get() @@ -33,7 +33,7 @@ class Combinator(ChatProcessor): ------- Tuple of chat data processed by each chat processor. ''' - return tuple([processor.process(chat_components) - for processor in self.processors]) + return tuple(processor.process(chat_components) + for processor in self.processors)