
pytchat is a python library for fetching youtube live chat.
pytchat is a python library for fetching youtube live chat without using Selenium or BeautifulSoup.
Other features:
- Customizable [Login to see the link] including youtube api compatible one.
- Available on asyncio context.
- Quick fetching of initial chat data by generating continuation params instead of web scraping.
For more detailed information, see [Login to see the link].
[Login to see the link]
pip install pytchat
import pytchat
chat = pytchat.create(video_id="uIx8l2xlYVY")
while chat.is_alive():
for c in chat.get().sync_items():
print(f"{c.datetime} [{c.author.name}]- {c.message}")
import pytchat
import time
chat = pytchat.create(video_id="uIx8l2xlYVY")
while chat.is_alive():
print(chat.get().json())
time.sleep(5)
'''
# Each chat item can also be output in JSON format.
for c in chat.get().items:
print(c.json())
'''
Project Repository
GitHub : [Login to see the link]
Wiki : [Login to see the link]
This content has been shared for Educational And Non-Profit Purpose ONLY