diff --git a/pytchat/__init__.py b/pytchat/__init__.py index 5729f66..2b8334b 100644 --- a/pytchat/__init__.py +++ b/pytchat/__init__.py @@ -2,7 +2,7 @@ pytchat is a python library for fetching youtube live chat without using yt api, Selenium, or BeautifulSoup. """ __copyright__ = 'Copyright (C) 2019 taizan-hokuto' -__version__ = '0.0.5.3' +__version__ = '0.0.6.1' __license__ = 'MIT' __author__ = 'taizan-hokuto' __author_email__ = '55448286+taizan-hokuto@users.noreply.github.com' diff --git a/pytchat/config/__init__.py b/pytchat/config/__init__.py index fe4b55f..a36d2b0 100644 --- a/pytchat/config/__init__.py +++ b/pytchat/config/__init__.py @@ -4,7 +4,7 @@ headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36'} -def logger(module_name: str, loglevel = logging.DEBUG): +def logger(module_name: str, loglevel = None): module_logger = mylogger.get_logger(module_name, loglevel = loglevel) return module_logger diff --git a/pytchat/processors/superchat/__init__.py b/pytchat/processors/superchat/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pytchat/tool/extract/extractor.py b/pytchat/tool/extract/extractor.py index 58141db..8052cd5 100644 --- a/pytchat/tool/extract/extractor.py +++ b/pytchat/tool/extract/extractor.py @@ -9,7 +9,7 @@ headers=config.headers class Extractor: - def __init__(self, video_id, div, callback = None, processor = None): + def __init__(self, video_id, div = 1, callback = None, processor = None): if not isinstance(div ,int) or div < 1: raise ValueError('div must be positive integer.') elif div > 10: diff --git a/pytchat/tool/videoinfo.py b/pytchat/tool/videoinfo.py index c0a5099..a27b6ca 100644 --- a/pytchat/tool/videoinfo.py +++ b/pytchat/tool/videoinfo.py @@ -124,7 +124,6 @@ def get_duration(self): return None def get_title(self): - print(self._renderer) if self._renderer.get("title"): return [''.join(run["text"]) for run in self._renderer["title"]["runs"]][0] diff --git a/setup.py b/setup.py index 07418ed..366d0b7 100644 --- a/setup.py +++ b/setup.py @@ -16,16 +16,6 @@ def _test_requirements(): for name in open(path.join( root_dir, 'requirements_test.txt')).readlines()] -txt= '' -with open('README.MD', 'r', encoding='utf-8') as f: - txt = f.read() - -with open('README1.MD', 'w', encoding='utf-8', newline='\n') as f: - f.write(txt) - -remove("README.MD") -rename("README1.MD","README.MD") - with open(path.join(root_dir, package_name, '__init__.py')) as f: init_text = f.read() version = re.search( @@ -55,7 +45,7 @@ def _test_requirements(): setup( name=package_name, - packages=find_packages(exclude=['*log.txt','*tests']), + packages=find_packages(exclude=['*log.txt','*tests','*testrun']), version=version, url=url, author=author,