Compare commits

...

13 Commits

Author SHA1 Message Date
55448286+taizan-hokuto@users.noreply.github.com
44dc5ff1c3 Merge branch 'develop' 2019-11-03 19:53:10 +09:00
55448286+taizan-hokuto@users.noreply.github.com
0676ee5c8c Increment version 2019-11-03 19:50:22 +09:00
55448286+taizan-hokuto@users.noreply.github.com
89ddc0551f Export ChatProcessor 2019-11-03 19:41:15 +09:00
55448286+taizan-hokuto@users.noreply.github.com
0a8cd83d41 Update README 2019-11-03 19:38:09 +09:00
55448286+taizan-hokuto@users.noreply.github.com
cb505074f7 Modify comment 2019-11-03 19:04:02 +09:00
55448286+taizan-hokuto@users.noreply.github.com
e9e16b2bcc Export ChatProcessor 2019-11-03 19:02:40 +09:00
55448286+taizan-hokuto@users.noreply.github.com
c596911901 Add DEMO graphic 2019-11-03 18:30:44 +09:00
55448286+taizan-hokuto@users.noreply.github.com
275e1a7aa8 Fix comment typo 2019-11-03 18:01:00 +09:00
55448286+taizan-hokuto@users.noreply.github.com
737095e7fb Merge branch 'develop' 2019-11-03 16:09:41 +09:00
55448286+taizan-hokuto@users.noreply.github.com
10d9f76f67 Increment version 2019-11-03 16:09:13 +09:00
55448286+taizan-hokuto@users.noreply.github.com
34a74f28aa Add remarks 2019-11-03 16:08:50 +09:00
55448286+taizan-hokuto@users.noreply.github.com
c3c4827798 Fix currency name typo 2019-11-03 16:07:50 +09:00
55448286+taizan-hokuto@users.noreply.github.com
e930c75e2d Update README 2019-11-03 16:07:20 +09:00
8 changed files with 21 additions and 9 deletions

View File

@@ -13,10 +13,14 @@ Other features:
+ Quick fetching of initial chat data by generating continuation params
instead of web scraping.
For more detailed information, see [wiki](https://github.com/taizan-hokuto/pytchat/wiki)
## Install
```python
pip install pytchat
```
## Demo
![demo](https://taizan-hokuto.github.io/statics/demo.gif "demo")
## Examples
### on-demand mode
@@ -133,7 +137,12 @@ Structure of each item which got from items() function.
<tr>
<td>currency</td>
<td>str</td>
<td>ex. "USD"</td>
<td>ISO 4217 currency codes (ex. "USD")</td>
</tr>
<tr>
<td>bgColor</td>
<td>int</td>
<td>RGB Int</td>
</tr>
<tr>
<td>author</td>

View File

@@ -2,7 +2,7 @@
pytchat is a python library for fetching youtube live chat.
"""
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
__version__ = '0.0.2.0'
__version__ = '0.0.2.2'
__license__ = 'MIT'
__author__ = 'taizan-hokuto'
__author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'
@@ -13,6 +13,7 @@ __all__ = ["core_async","core_multithread","processors"]
from .api import (
LiveChat,
LiveChatAsync,
ChatProcessor,
CompatibleProcessor,
SimpleDisplayProcessor,
JsonfileArchiveProcessor

View File

@@ -1,5 +1,6 @@
from .core_async.livechat import LiveChatAsync
from .core_multithread.livechat import LiveChat
from .processors.chat_processor import ChatProcessor
from .processors.default.processor import DefaultProcessor
from .processors.compatible.processor import CompatibleProcessor
from .processors.simple_display_processor import SimpleDisplayProcessor

View File

@@ -2,7 +2,7 @@
import asyncio
class Buffer(asyncio.Queue):
'''
チャットデータを格納するバッファの役割を持つLIFOキュー
チャットデータを格納するバッファの役割を持つFIFOキュー
Parameter
---------

View File

@@ -1,4 +1,4 @@
import aiohttp, asyncio, async_timeout
import aiohttp, asyncio
import datetime
import json
import random

View File

@@ -3,7 +3,7 @@ import queue
class Buffer(queue.Queue):
'''
チャットデータを格納するバッファの役割を持つLIFOキュー
チャットデータを格納するバッファの役割を持つFIFOキュー
Parameter
---------

View File

@@ -5,11 +5,12 @@ class ChatProcessor:
'''
def process(self, chat_components: list):
'''
チャットデータの加工を表すインターフェース
Listenerから呼び出される。
チャットデータの加工を表すインターフェース
LiveChatオブジェクトから呼び出される。
Parameter
----------
chat_components: list<component>
chat_components: [LIST:component]
component : dict {
"video_id" : str
動画ID

View File

@@ -23,7 +23,7 @@ symbols = {
"PLN\xa0": {"fxtext": "PLN", "jptext": "ポーランド・ズロチ"},
"R$": {"fxtext": "BRL", "jptext": "ブラジル・レアル"},
"RUB\xa0": {"fxtext": "RUB", "jptext": "ロシア・ルーブル"},
"SEK\xa0": {"fxtext": "SEK", "jptext": "スウェーデン・クロー"},
"SEK\xa0": {"fxtext": "SEK", "jptext": "スウェーデン・クロー"},
"£": {"fxtext": "GBP", "jptext": "英・ポンド"},
"": {"fxtext": "KRW", "jptext": "韓国・ウォン"},
"": {"fxtext": "EUR", "jptext": "欧・ユーロ"},