chat-downloader


Namechat-downloader JSON
Version 0.2.8 PyPI version JSON
download
home_pagehttps://github.com/xenova/chat-downloader
SummaryA simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!
upload_time2023-09-03 23:43:33
maintainer
docs_urlNone
authorxenova
requires_python>=3.6
licenseMIT license
keywords python chat downloader youtube twitch
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ..
    TODO
    - temp move ... move back to root
    - auto-generate using other rst files

***************
Chat Downloader
***************

.. image:: https://img.shields.io/pypi/pyversions/chat-downloader
   :target: https://pypi.org/project/chat-downloader
   :alt: Python

.. image:: https://img.shields.io/pypi/v/chat-downloader.svg
   :target: https://pypi.org/project/chat-downloader
   :alt: PyPI version

.. image:: https://pepy.tech/badge/chat-downloader/month
   :target: https://pypi.org/project/chat-downloader
   :alt: Downloads

.. image:: https://img.shields.io/github/license/xenova/chat-downloader
  :target: https://github.com/xenova/chat-downloader/blob/master/LICENSE
  :alt: License

.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fxenova%2Fchat-downloader%2Fmaster%2Fdocs%2F_dynamic%2Fcoverage.json
  :target: https://pypi.org/project/chat-downloader
  :alt: Coverage

..
    [![GitHub issues](https://img.shields.io/github/issues/xenova/chat-downloader)](https://badge.fury.io/py/chat-downloader)
    [![GitHub forks](https://img.shields.io/github/forks/xenova/chat-downloader)](https://badge.fury.io/py/chat-downloader)
    [![GitHub stars](https://img.shields.io/github/stars/xenova/chat-downloader)](https://badge.fury.io/py/chat-downloader)
    [![Downloads](https://img.shields.io/github/downloads/xenova/chat-downloader/total.svg)](https://github.com/xenova/chat-downloader/releases)

`Chat Downloader`_ is a simple tool used to retrieve chat messages from livestreams,
videos, clips and past broadcasts. No authentication needed!

.. _Chat Downloader: https://github.com/xenova/chat-downloader

############
Installation
############

This tool is distributed on PyPI_ and can be installed with ``pip``:

.. _PyPI: https://pypi.org/project/chat-downloader/

.. code:: console

   $ pip install chat-downloader

To update to the latest version, add the ``--upgrade`` flag to the above command.

Alternatively, the tool can be installed with ``git``:

.. code:: console

   $ git clone https://github.com/xenova/chat-downloader.git
   $ cd chat-downloader
   $ python setup.py install


#####
Usage
#####


Command line
------------

.. code:: console

    usage: chat_downloader [-h] [--version] [--start_time START_TIME]
                           [--end_time END_TIME]
                           [--message_types MESSAGE_TYPES | --message_groups MESSAGE_GROUPS]
                           [--max_attempts MAX_ATTEMPTS]
                           [--retry_timeout RETRY_TIMEOUT]
                           [--interruptible_retry [INTERRUPTIBLE_RETRY]]
                           [--max_messages MAX_MESSAGES]
                           [--inactivity_timeout INACTIVITY_TIMEOUT]
                           [--timeout TIMEOUT] [--format FORMAT]
                           [--format_file FORMAT_FILE] [--chat_type {live,top}]
                           [--ignore IGNORE]
                           [--message_receive_timeout MESSAGE_RECEIVE_TIMEOUT]
                           [--buffer_size BUFFER_SIZE] [--output OUTPUT]
                           [--overwrite [OVERWRITE]] [--sort_keys [SORT_KEYS]]
                           [--indent INDENT] [--pause_on_debug | --exit_on_debug]
                           [--logging {none,debug,info,warning,error,critical} | --testing | --verbose | --quiet]
                           [--cookies COOKIES] [--proxy PROXY]
                           url


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=jfKfPfyJRdk --output chat.json



For a description of these options, as well as advanced command line use-cases and examples, consult the `Command Line Usage <https://chat-downloader.readthedocs.io/en/latest/cli.html#command-line-usage>`_ page.


Python
------

.. code:: python

   from chat_downloader import ChatDownloader

   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


For advanced python use-cases and examples, consult the `Python Documentation <https://chat-downloader.readthedocs.io/en/latest/source/index.html#python-documentation>`_.


##########
Chat Items
##########

Chat items/messages are parsed into JSON objects (a.k.a. dictionaries) and should follow a format similar to this:

.. code-block::

    {
        ...
        "message_id": "xxxxxxxxxx",
        "message": "actual message goes here",
        "message_type": "text_message",
        "timestamp": 1613761152565924,
        "time_in_seconds": 1234.56,
        "time_text": "20:34",
        "author": {
            "id": "UCxxxxxxxxxxxxxxxxxxxxxxx",
            "name": "username_of_sender",
            "images": [
                ...
            ],
            "badges": [
                ...
            ]
        },
        ...
    }


For an extensive, documented list of included fields, consult the `Chat Item Fields <https://chat-downloader.readthedocs.io/en/latest/items.html#chat-item-fields>`_ page.

##########################
Frequently Asked Questions
##########################

*Coming soon*

######
Issues
######

Found a bug or have a suggestion? File an issue `here`_. To assist the
developers in fixing the issue, please follow the issue template as
closely as possible.

.. _here: https://github.com/xenova/chat-downloader/issues/new/choose


############
Contributing
############

If you would like to help improve the tool, you'll find more
information on contributing in our `Contributing Guide <https://chat-downloader.readthedocs.io/en/latest/contributing.html#contributing-guide>`_.


################
Supported sites:
################

-  YouTube.com - Livestreams, past broadcasts and premieres.
-  Twitch.tv - Livestreams, past broadcasts and clips.
-  Zoom.us - 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
.. _Python Wiki: https://github.com/xenova/chat-downloader/wiki/Python-Documentation


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xenova/chat-downloader",
    "name": "chat-downloader",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "python chat downloader youtube twitch",
    "author": "xenova",
    "author_email": "admin@xenova.com",
    "download_url": "https://files.pythonhosted.org/packages/c0/28/b6df5c84e271e1b51a1da23a0f3c728cc1fce6aee66913d9e4c130f23318/chat-downloader-0.2.8.tar.gz",
    "platform": null,
    "description": "..\n    TODO\n    - temp move ... move back to root\n    - auto-generate using other rst files\n\n***************\nChat Downloader\n***************\n\n.. image:: https://img.shields.io/pypi/pyversions/chat-downloader\n   :target: https://pypi.org/project/chat-downloader\n   :alt: Python\n\n.. image:: https://img.shields.io/pypi/v/chat-downloader.svg\n   :target: https://pypi.org/project/chat-downloader\n   :alt: PyPI version\n\n.. image:: https://pepy.tech/badge/chat-downloader/month\n   :target: https://pypi.org/project/chat-downloader\n   :alt: Downloads\n\n.. image:: https://img.shields.io/github/license/xenova/chat-downloader\n  :target: https://github.com/xenova/chat-downloader/blob/master/LICENSE\n  :alt: License\n\n.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fxenova%2Fchat-downloader%2Fmaster%2Fdocs%2F_dynamic%2Fcoverage.json\n  :target: https://pypi.org/project/chat-downloader\n  :alt: Coverage\n\n..\n    [![GitHub issues](https://img.shields.io/github/issues/xenova/chat-downloader)](https://badge.fury.io/py/chat-downloader)\n    [![GitHub forks](https://img.shields.io/github/forks/xenova/chat-downloader)](https://badge.fury.io/py/chat-downloader)\n    [![GitHub stars](https://img.shields.io/github/stars/xenova/chat-downloader)](https://badge.fury.io/py/chat-downloader)\n    [![Downloads](https://img.shields.io/github/downloads/xenova/chat-downloader/total.svg)](https://github.com/xenova/chat-downloader/releases)\n\n`Chat Downloader`_ is a simple tool used to retrieve chat messages from livestreams,\nvideos, clips and past broadcasts. No authentication needed!\n\n.. _Chat Downloader: https://github.com/xenova/chat-downloader\n\n############\nInstallation\n############\n\nThis tool is distributed on PyPI_ and can be installed with ``pip``:\n\n.. _PyPI: https://pypi.org/project/chat-downloader/\n\n.. code:: console\n\n   $ pip install chat-downloader\n\nTo update to the latest version, add the ``--upgrade`` flag to the above command.\n\nAlternatively, the tool can be installed with ``git``:\n\n.. code:: console\n\n   $ git clone https://github.com/xenova/chat-downloader.git\n   $ cd chat-downloader\n   $ python setup.py install\n\n\n#####\nUsage\n#####\n\n\nCommand line\n------------\n\n.. code:: console\n\n    usage: chat_downloader [-h] [--version] [--start_time START_TIME]\n                           [--end_time END_TIME]\n                           [--message_types MESSAGE_TYPES | --message_groups MESSAGE_GROUPS]\n                           [--max_attempts MAX_ATTEMPTS]\n                           [--retry_timeout RETRY_TIMEOUT]\n                           [--interruptible_retry [INTERRUPTIBLE_RETRY]]\n                           [--max_messages MAX_MESSAGES]\n                           [--inactivity_timeout INACTIVITY_TIMEOUT]\n                           [--timeout TIMEOUT] [--format FORMAT]\n                           [--format_file FORMAT_FILE] [--chat_type {live,top}]\n                           [--ignore IGNORE]\n                           [--message_receive_timeout MESSAGE_RECEIVE_TIMEOUT]\n                           [--buffer_size BUFFER_SIZE] [--output OUTPUT]\n                           [--overwrite [OVERWRITE]] [--sort_keys [SORT_KEYS]]\n                           [--indent INDENT] [--pause_on_debug | --exit_on_debug]\n                           [--logging {none,debug,info,warning,error,critical} | --testing | --verbose | --quiet]\n                           [--cookies COOKIES] [--proxy PROXY]\n                           url\n\n\nFor example, to save messages from a livestream to a JSON file, you can use:\n\n.. code:: console\n\n   $ chat_downloader https://www.youtube.com/watch?v=jfKfPfyJRdk --output chat.json\n\n\n\nFor a description of these options, as well as advanced command line use-cases and examples, consult the `Command Line Usage <https://chat-downloader.readthedocs.io/en/latest/cli.html#command-line-usage>`_ page.\n\n\nPython\n------\n\n.. code:: python\n\n   from chat_downloader import ChatDownloader\n\n   url = 'https://www.youtube.com/watch?v=jfKfPfyJRdk'\n   chat = ChatDownloader().get_chat(url)       # create a generator\n   for message in chat:                        # iterate over messages\n       chat.print_formatted(message)           # print the formatted message\n\n\nFor advanced python use-cases and examples, consult the `Python Documentation <https://chat-downloader.readthedocs.io/en/latest/source/index.html#python-documentation>`_.\n\n\n##########\nChat Items\n##########\n\nChat items/messages are parsed into JSON objects (a.k.a. dictionaries) and should follow a format similar to this:\n\n.. code-block::\n\n    {\n        ...\n        \"message_id\": \"xxxxxxxxxx\",\n        \"message\": \"actual message goes here\",\n        \"message_type\": \"text_message\",\n        \"timestamp\": 1613761152565924,\n        \"time_in_seconds\": 1234.56,\n        \"time_text\": \"20:34\",\n        \"author\": {\n            \"id\": \"UCxxxxxxxxxxxxxxxxxxxxxxx\",\n            \"name\": \"username_of_sender\",\n            \"images\": [\n                ...\n            ],\n            \"badges\": [\n                ...\n            ]\n        },\n        ...\n    }\n\n\nFor an extensive, documented list of included fields, consult the `Chat Item Fields <https://chat-downloader.readthedocs.io/en/latest/items.html#chat-item-fields>`_ page.\n\n##########################\nFrequently Asked Questions\n##########################\n\n*Coming soon*\n\n######\nIssues\n######\n\nFound a bug or have a suggestion? File an issue `here`_. To assist the\ndevelopers in fixing the issue, please follow the issue template as\nclosely as possible.\n\n.. _here: https://github.com/xenova/chat-downloader/issues/new/choose\n\n\n############\nContributing\n############\n\nIf you would like to help improve the tool, you'll find more\ninformation on contributing in our `Contributing Guide <https://chat-downloader.readthedocs.io/en/latest/contributing.html#contributing-guide>`_.\n\n\n################\nSupported sites:\n################\n\n-  YouTube.com - Livestreams, past broadcasts and premieres.\n-  Twitch.tv - Livestreams, past broadcasts and clips.\n-  Zoom.us - Past broadcasts\n-  Facebook.com (currently in development) - Livestreams and past\n   broadcasts.\n\n.. _Chat Item Wiki: https://github.com/xenova/chat-downloader/wiki/Item-Template\n.. _Command Line Wiki: https://github.com/xenova/chat-downloader/wiki/Command-Line-Usage\n.. _Python Wiki: https://github.com/xenova/chat-downloader/wiki/Python-Documentation\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!",
    "version": "0.2.8",
    "project_urls": {
        "Homepage": "https://github.com/xenova/chat-downloader"
    },
    "split_keywords": [
        "python",
        "chat",
        "downloader",
        "youtube",
        "twitch"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28af019d012893ab913e2e9ded64c061c920c6b41c7ec068da3c609672a00abc",
                "md5": "dfe78b5c32f4a677ea5207853839f708",
                "sha256": "2d9bbddc0a85371ba44814c3686ee6e5f70c0531d1f5ecc236eae5a5bbb90465"
            },
            "downloads": -1,
            "filename": "chat_downloader-0.2.8-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dfe78b5c32f4a677ea5207853839f708",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 77598,
            "upload_time": "2023-09-03T23:43:31",
            "upload_time_iso_8601": "2023-09-03T23:43:31.425731Z",
            "url": "https://files.pythonhosted.org/packages/28/af/019d012893ab913e2e9ded64c061c920c6b41c7ec068da3c609672a00abc/chat_downloader-0.2.8-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c028b6df5c84e271e1b51a1da23a0f3c728cc1fce6aee66913d9e4c130f23318",
                "md5": "adef56aabf5c8ad2273a6b36b4192fc1",
                "sha256": "5816ac06179f81190e74c773d8afda82f4be718ea6dffdf7c22bbe265e1dd428"
            },
            "downloads": -1,
            "filename": "chat-downloader-0.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "adef56aabf5c8ad2273a6b36b4192fc1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 108702,
            "upload_time": "2023-09-03T23:43:33",
            "upload_time_iso_8601": "2023-09-03T23:43:33.266988Z",
            "url": "https://files.pythonhosted.org/packages/c0/28/b6df5c84e271e1b51a1da23a0f3c728cc1fce6aee66913d9e4c130f23318/chat-downloader-0.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-03 23:43:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xenova",
    "github_project": "chat-downloader",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "chat-downloader"
}
        
Elapsed time: 0.26500s