Update dl.py
parent
8158cc0246
commit
d105b6e3b7
|
@ -94,13 +94,13 @@ def command(ctx, anime_url, episode_range, url, player, skip_download, quality,
|
||||||
""" Download the anime using the url or search for it.
|
""" Download the anime using the url or search for it.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if episode_range:
|
"""if episode_range:
|
||||||
regexed_range = re.compile("^:?(\d+)?:?(\d+)?$").search(episode_range)
|
regexed_range = re.compile("^:?(\d+)?:?(\d+)?$").search(episode_range)
|
||||||
# Prevent such cases as: :5: and :1:1
|
# Prevent such cases as: :5: and :1:1
|
||||||
if not regexed_range or (len(regexed_range.groups()) >= episode_range.count(":") and episode_range.count(":") != 1):
|
if not regexed_range or (len(regexed_range.groups()) >= episode_range.count(":") and episode_range.count(":") != 1):
|
||||||
raise click.UsageError(
|
raise click.UsageError(
|
||||||
"Invalid value for '--episode' / '-e': {} is not a valid range".format(episode_range))
|
"Invalid value for '--episode' / '-e': {} is not a valid range".format(episode_range))
|
||||||
|
"""
|
||||||
if sub and dub:
|
if sub and dub:
|
||||||
raise click.UsageError(
|
raise click.UsageError(
|
||||||
"--dub/-d and --sub/-s flags cannot be used together")
|
"--dub/-d and --sub/-s flags cannot be used together")
|
||||||
|
|
Loading…
Reference in New Issue