xenova / chat-downloader

A simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!
https://chat-downloader.readthedocs.io/
MIT License
902 stars 127 forks source link

[QUESTION] Title goes here #228

Open Kohkitos opened 10 months ago

Kohkitos commented 10 months ago

What is your question?

How do I get all the items listed when using Python?

Additional context

When I do this loop


chat = ChatDownloader().get_chat(url,
                                retry_timeout = -1,
                                timeout = 5) 
temp = []
for message in chat:                        
    temp.append(message)

The only output items I get are:

{'action_type': 'add_chat_item',
 'message': 'JAJAJAJAJA dejá de agradecer pelotudeces',
 'message_id': 'ChwKGkNOZkUwcWJYcDRJREZWckJ3Z1FkX01nUC1B',
 'timestamp': 1699009418056860,
 'author': {'name': 'Ulises Leiva',
  'images': [{'url': 'https://yt4.ggpht.com/ytc/APkrFKart4fKJfTfzCQhbk9rss29RRQg7FPfmtCulA',
    'id': 'source'},
   {'url': 'https://yt4.ggpht.com/ytc/APkrFKart4fKJfTfzCQhbk9rss29RRQg7FPfmtCulA=s32-c-k-c0x00ffffff-no-rj',
    'width': 32,
    'height': 32,
    'id': '32x32'},
   {'url': 'https://yt4.ggpht.com/ytc/APkrFKart4fKJfTfzCQhbk9rss29RRQg7FPfmtCulA=s64-c-k-c0x00ffffff-no-rj',
    'width': 64,
    'height': 64,
    'id': '64x64'}],
  'id': 'UC7Q4MGrsEBzY8_oC20pdgbg'},
 'message_type': 'text_message'}