Compare commits

..

6 Commits

Author SHA1 Message Date
taizan-hokouto
3106b3e545 Merge branch 'hotfix/filepath' 2020-10-04 11:33:58 +09:00
taizan-hokouto
50816a661d Increment version 2020-10-04 11:30:07 +09:00
taizan-hokouto
6755bc8bb2 Make sure to pass fixed filepath to processor 2020-10-04 11:29:52 +09:00
taizan-hokouto
26be989b9b Merge branch 'hotfix/fix' 2020-10-04 10:32:53 +09:00
taizan-hokouto
73ad0a1f44 Increment version 2020-10-04 10:22:34 +09:00
taizan-hokouto
66b185ebf7 Fix constructing filepath 2020-10-04 10:20:14 +09:00
2 changed files with 5 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
pytchat is a lightweight python library to browse youtube livechat without Selenium or BeautifulSoup. pytchat is a lightweight python library to browse youtube livechat without Selenium or BeautifulSoup.
""" """
__copyright__ = 'Copyright (C) 2019 taizan-hokuto' __copyright__ = 'Copyright (C) 2019 taizan-hokuto'
__version__ = '0.2.7' __version__ = '0.3.0'
__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'

View File

@@ -56,12 +56,10 @@ def main():
try: try:
video_id = extract_video_id(video_id) video_id = extract_video_id(video_id)
if os.path.exists(Arguments().output): if not 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:
raise FileNotFoundError raise FileNotFoundError
separated_path = str(Path(Arguments().output)) + os.path.sep
path = util.checkpath(separated_path + video_id + '.html')
err = None err = None
for _ in range(3): # retry 3 times for _ in range(3): # retry 3 times
try: try:
@@ -93,7 +91,7 @@ def main():
if data == []: if data == []:
return False return False
pbar.reset("#", "=", total=len(data), status="Rendering ") pbar.reset("#", "=", total=len(data), status="Rendering ")
processor = HTMLArchiver(Arguments().output + video_id + '.html', callback=pbar._disp) processor = HTMLArchiver(path, callback=pbar._disp)
processor.process( processor.process(
[{'video_id': None, [{'video_id': None,
'timeout': 1, 'timeout': 1,