Merge branch 'hotfix/fix_cli'
This commit is contained in:
@@ -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.1.0'
|
__version__ = '0.1.1'
|
||||||
__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,9 +20,6 @@ https://github.com/PetterKraabol/Twitch-Chat-Downloader
|
|||||||
def main():
|
def main():
|
||||||
# Arguments
|
# Arguments
|
||||||
parser = argparse.ArgumentParser(description=f'pytchat v{__version__}')
|
parser = argparse.ArgumentParser(description=f'pytchat v{__version__}')
|
||||||
# parser.add_argument('VideoID_or_URL', type=str, default='__NONE__',nargs='?',
|
|
||||||
# help='Video ID, or URL that includes id.\n'
|
|
||||||
# 'If ID starts with a hyphen (-), enclose the ID in square brackets.')
|
|
||||||
parser.add_argument('-v', f'--{Arguments.Name.VIDEO_IDS}', type=str,
|
parser.add_argument('-v', f'--{Arguments.Name.VIDEO_IDS}', type=str,
|
||||||
help='Video ID (or URL that includes Video ID). You can specify multiple video IDs by separating them with commas without spaces.\n'
|
help='Video ID (or URL that includes Video ID). You can specify multiple video IDs by separating them with commas without spaces.\n'
|
||||||
'If ID starts with a hyphen (-), enclose the ID in square brackets.')
|
'If ID starts with a hyphen (-), enclose the ID in square brackets.')
|
||||||
@@ -41,6 +38,7 @@ def main():
|
|||||||
if '[' in video_id:
|
if '[' in video_id:
|
||||||
video_id = video_id.replace('[', '').replace(']', '')
|
video_id = video_id.replace('[', '').replace(']', '')
|
||||||
try:
|
try:
|
||||||
|
video_id = extract_video_id(video_id)
|
||||||
info = VideoInfo(video_id)
|
info = VideoInfo(video_id)
|
||||||
print(f"Extracting...\n"
|
print(f"Extracting...\n"
|
||||||
f" video_id: {video_id}\n"
|
f" video_id: {video_id}\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user