Merge branch 'develop'
This commit is contained in:
32
README.md
32
README.md
@@ -1,11 +1,10 @@
|
|||||||
|
|
||||||
pytchat
|
pytchat
|
||||||
=======
|
=======
|
||||||
|
|
||||||
pytchat is a python library for fetching youtube live chat.
|
pytchat is a python library for fetching youtube live chat.
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
pytchat is a python library for fetching youtube live chat.
|
pytchat is a python library for fetching youtube live chat
|
||||||
without using youtube api, Selenium or BeautifulSoup.
|
without using youtube api, Selenium or BeautifulSoup.
|
||||||
|
|
||||||
Other features:
|
Other features:
|
||||||
@@ -15,12 +14,13 @@ Other features:
|
|||||||
instead of web scraping.
|
instead of web scraping.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
```
|
```python
|
||||||
pip install pytchat
|
pip install pytchat
|
||||||
```
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
```
|
### on-demand mode
|
||||||
|
```python
|
||||||
from pytchat import LiveChat
|
from pytchat import LiveChat
|
||||||
|
|
||||||
chat = LiveChat("G1w62uEMZ74")
|
chat = LiveChat("G1w62uEMZ74")
|
||||||
@@ -31,12 +31,14 @@ while chat.is_alive():
|
|||||||
data.tick()
|
data.tick()
|
||||||
```
|
```
|
||||||
|
|
||||||
callback mode
|
### callback mode
|
||||||
```
|
```python
|
||||||
from pytchat import LiveChat
|
from pytchat import LiveChat
|
||||||
|
import time
|
||||||
|
|
||||||
chat = LiveChat("G1w62uEMZ74", callback = func)
|
chat = LiveChat("G1w62uEMZ74", callback = func)
|
||||||
while chat.is_alive():
|
while chat.is_alive():
|
||||||
|
#other background operation here.
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
def func(chatdata):
|
def func(chatdata):
|
||||||
@@ -45,8 +47,8 @@ def func(chatdata):
|
|||||||
chat.tick()
|
chat.tick()
|
||||||
```
|
```
|
||||||
|
|
||||||
asyncio context:
|
### asyncio context:
|
||||||
```
|
```python
|
||||||
from pytchat import LiveChatAsync
|
from pytchat import LiveChatAsync
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
@@ -66,8 +68,8 @@ loop.run_until_complete(main())
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
yt api compatible processor:
|
### yt api compatible processor:
|
||||||
```
|
```python
|
||||||
from pytchat import LiveChat, CompatibleProcessor
|
from pytchat import LiveChat, CompatibleProcessor
|
||||||
|
|
||||||
chat = LiveChat("G1w62uEMZ74",
|
chat = LiveChat("G1w62uEMZ74",
|
||||||
@@ -113,6 +115,11 @@ Structure of each item which got from items() function.
|
|||||||
<td>int</td>
|
<td>int</td>
|
||||||
<td>unixtime milliseconds</td>
|
<td>unixtime milliseconds</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>datetime</td>
|
||||||
|
<td>str</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>amountValue</td>
|
<td>amountValue</td>
|
||||||
<td>float</td>
|
<td>float</td>
|
||||||
@@ -188,10 +195,13 @@ Structure of author object.
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
[taizan-hokuto](https://github.com/taizan-hokuto)
|
[taizan-hokuto](https://github.com/taizan-hokuto)
|
||||||
|
|
||||||
|
[twitter:@taizan205](https://twitter.com/taizan205)
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
pytchat is a python library for fetching youtube live chat.
|
pytchat is a python library for fetching youtube live chat.
|
||||||
"""
|
"""
|
||||||
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
|
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
|
||||||
__version__ = '0.0.1.5'
|
__version__ = '0.0.1.6'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__author__ = 'taizan-hokuto'
|
__author__ = 'taizan-hokuto'
|
||||||
__author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'
|
__author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'
|
||||||
|
|||||||
Reference in New Issue
Block a user