Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some improvements #151

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions chat_downloader/chat_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,5 +385,10 @@ def callback(item):
else:
log('error', 'Keyboard Interrupt')

else: # No exceptions raised
return

finally:
downloader.close()

return 1
2 changes: 1 addition & 1 deletion chat_downloader/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@ def add_init_param(group, *keys, **kwargs):
set_log_level(args.logging)

# Run with these arguments
run(**args.__dict__)
return run(**args.__dict__)
4 changes: 2 additions & 2 deletions chat_downloader/sites/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ class Chat():
next value is yielded from the object's `chat` generator method.
"""

def __init__(self, chat=None, title=None, duration=None, status=None, video_type=None, start_time=None, id=None, **kwargs):
def __init__(self, chat=None, title="", duration=None, status=None, video_type=None, start_time=None, id=None, **kwargs):
"""Create a Chat object

:param chat: Generator method for retrieving chat messages, defaults to None
:type chat: generator, optional
:param title: Stream or video title, defaults to None
:param title: Stream or video title, defaults to an empty string
:type title: str, optional
:param duration: Duration of the stream or video, defaults to None
:type duration: float, optional
Expand Down
2 changes: 2 additions & 0 deletions chat_downloader/sites/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def __init__(self, **kwargs):

_SITE_DEFAULT_PARAMS = {
'format': 'youtube',
'message_groups': ['messages', 'superchat']
}

_TESTS = [
Expand Down Expand Up @@ -467,6 +468,7 @@ def __init__(self, **kwargs):

# Gifts
'sponsorships_gift_purchase_announcement',
'sponsorships_gift_redemption_announcement'
],
'tickers': [
# superchat messages which appear ticker (at the top)
Expand Down