Skip to content

Commit

Permalink
Merge pull request #181 from xenova/fixes
Browse files Browse the repository at this point in the history
Many fixes
  • Loading branch information
xenova committed Nov 29, 2022
2 parents d2b354d + b9c50fa commit cc732e3
Show file tree
Hide file tree
Showing 13 changed files with 136 additions and 150 deletions.
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ For example, to save messages from a livestream to a JSON file, you can use:

.. code:: console
$ chat_downloader https://www.youtube.com/watch?v=5qap5aO4i9A --output chat.json
$ chat_downloader https://www.youtube.com/watch?v=jfKfPfyJRdk --output chat.json
Expand All @@ -109,7 +109,7 @@ Python
from chat_downloader import ChatDownloader
url = 'https://www.youtube.com/watch?v=5qap5aO4i9A'
url = 'https://www.youtube.com/watch?v=jfKfPfyJRdk'
chat = ChatDownloader().get_chat(url) # create a generator
for message in chat: # iterate over messages
chat.print_formatted(message) # print the formatted message
Expand Down Expand Up @@ -182,7 +182,8 @@ Supported sites:
- YouTube.com - Livestreams, past broadcasts and premieres.
- Twitch.tv - Livestreams, past broadcasts and clips.
- Reddit.com - Livestreams, past broadcasts

- Facebook.com (currently in development) - Livestreams and past
broadcasts.

.. _Chat Item Wiki: https://github.com/xenova/chat-downloader/wiki/Item-Template
.. _Command Line Wiki: https://github.com/xenova/chat-downloader/wiki/Command-Line-Usage
Expand Down
2 changes: 1 addition & 1 deletion chat_downloader/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
__email__ = 'admin@xenova.com'
__copyright__ = '2020-2022 xenova'
__url__ = 'https://github.com/xenova/chat-downloader'
__version__ = '0.2.0'
__version__ = '0.2.1'
4 changes: 2 additions & 2 deletions chat_downloader/sites/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class BaseChatDownloader:
{
'name': 'Get a certain number of messages from a livestream.',
'params': {
'url': 'https://www.youtube.com/watch?v=5qap5aO4i9A',
'url': 'https://www.youtube.com/watch?v=jfKfPfyJRdk',
'max_messages': 10,
'timeout': 60, # As a fallback
},
Expand All @@ -355,7 +355,7 @@ class BaseChatDownloader:
{
'name': 'Scheme not supplied',
'params': {
'url': 'www.youtube.com/watch?v=5qap5aO4i9A',
'url': 'www.youtube.com/watch?v=jfKfPfyJRdk',
'max_messages': 10,
'timeout': 60, # As a fallback
},
Expand Down
17 changes: 0 additions & 17 deletions chat_downloader/sites/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import json
import websocket
import time
import re


class RedditError(SiteError):
Expand Down Expand Up @@ -173,22 +172,6 @@ def __init__(self, **kwargs):
'timeout': 5
}
},

# Subreddits:
{
'name': 'Get chat of top livestream/post for subreddit #1',
'params': {
'url': 'https://www.reddit.com/rpan/r/pan',
'timeout': 5
}
},
{
'name': 'Get chat of top livestream/post for subreddit #2',
'params': {
'url': 'https://www.reddit.com/r/RedditSessions',
'timeout': 5
}
}
]

# Regex provided by youtube-dl
Expand Down

0 comments on commit cc732e3

Please sign in to comment.