From 66b185ebf70384fa4287deb5131260aef0b9e123 Mon Sep 17 00:00:00 2001 From: taizan-hokouto <55448286+taizan-hokuto@users.noreply.github.com> Date: Sun, 4 Oct 2020 10:20:14 +0900 Subject: [PATCH 1/2] Fix constructing filepath --- pytchat/cli/__init__.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pytchat/cli/__init__.py b/pytchat/cli/__init__.py index 1f89249..1e6a18f 100644 --- a/pytchat/cli/__init__.py +++ b/pytchat/cli/__init__.py @@ -56,12 +56,10 @@ def main(): try: video_id = extract_video_id(video_id) - if os.path.exists(Arguments().output): - if Arguments().output[-1] != "/" or Arguments().output[-1] != "\\": - Arguments().output = '/'.join([Arguments().output, os.path.sep]) - path = util.checkpath(Path.resolve(Path(Arguments().output + video_id + '.html'))) - else: + if not os.path.exists(Arguments().output): raise FileNotFoundError + separated_path = str(Path(Arguments().output)) + os.path.sep + path = util.checkpath(separated_path + video_id + '.html') err = None for _ in range(3): # retry 3 times try: From 73ad0a1f44bd68f28da6f371e167262043c792bb Mon Sep 17 00:00:00 2001 From: taizan-hokouto <55448286+taizan-hokuto@users.noreply.github.com> Date: Sun, 4 Oct 2020 10:22:34 +0900 Subject: [PATCH 2/2] Increment version --- pytchat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytchat/__init__.py b/pytchat/__init__.py index cf5705c..e285854 100644 --- a/pytchat/__init__.py +++ b/pytchat/__init__.py @@ -2,7 +2,7 @@ pytchat is a lightweight python library to browse youtube livechat without Selenium or BeautifulSoup. """ __copyright__ = 'Copyright (C) 2019 taizan-hokuto' -__version__ = '0.2.7' +__version__ = '0.2.9' __license__ = 'MIT' __author__ = 'taizan-hokuto' __author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'