Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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:
For more detailed information, see wiki.
wiki (Japanese)
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())
'''
Fetch chat with a buffer (LiveChat)
Use with asyncio (LiveChatAsync)
YT API compatible chat processor (CompatibleProcessor)
Each item can be got with sync_items()
function.
name | type | remarks |
---|---|---|
type | str | "superChat","textMessage","superSticker","newSponsor" |
id | str | |
message | str | emojis are represented by ":(shortcut text):" |
messageEx | str | list of message texts and emoji dicts(id, txt, url). |
timestamp | int | unixtime milliseconds |
datetime | str | e.g. "2019-10-10 12:34:56" |
elapsedTime | str | elapsed time. (e.g. "1:02:27") *Replay Only. |
amountValue | float | e.g. 1,234.0 |
amountString | str | e.g. "$ 1,234" |
currency | str | ISO 4217 currency codes (e.g. "USD") |
bgColor | int | RGB Int |
author | object | see below |
Structure of author object.
name | type | remarks |
---|---|---|
name | str | |
channelId | str | *chatter's channel ID. |
channelUrl | str | |
imageUrl | str | |
badgeUrl | str | |
isVerified | bool | |
isChatOwner | bool | |
isChatSponsor | bool | |
isChatModerator | bool |
FAQs
a python library for fetching youtube live chat.
We found that pytchat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.