Merge tag 'full_of_que_exception' into develop
v0.0.6.2
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
pytchat is a python library for fetching youtube live chat without using yt api, Selenium, or BeautifulSoup.
|
pytchat is a python library for fetching youtube live chat without using yt api, Selenium, or BeautifulSoup.
|
||||||
"""
|
"""
|
||||||
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
|
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
|
||||||
__version__ = '0.0.6.1'
|
__version__ = '0.0.6.2'
|
||||||
__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'
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ class Buffer(asyncio.Queue):
|
|||||||
super().get_nowait()
|
super().get_nowait()
|
||||||
await super().put(item)
|
await super().put(item)
|
||||||
|
|
||||||
|
def put_nowait(self,item):
|
||||||
|
if item is None:
|
||||||
|
return
|
||||||
|
if super().full():
|
||||||
|
super().get_nowait()
|
||||||
|
super().put_nowait(item)
|
||||||
|
|
||||||
async def get(self):
|
async def get(self):
|
||||||
ret = []
|
ret = []
|
||||||
ret.append(await super().get())
|
ret.append(await super().get())
|
||||||
|
|||||||
@@ -22,7 +22,14 @@ class Buffer(queue.Queue):
|
|||||||
else:
|
else:
|
||||||
super().put(item)
|
super().put(item)
|
||||||
|
|
||||||
|
def put_nowait(self,item):
|
||||||
|
if item is None:
|
||||||
|
return
|
||||||
|
if super().full():
|
||||||
|
super().get_nowait()
|
||||||
|
else:
|
||||||
|
super().put_nowait(item)
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
ret = []
|
ret = []
|
||||||
ret.append(super().get())
|
ret.append(super().get())
|
||||||
|
|||||||
Reference in New Issue
Block a user