Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions gdown/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import re
import sys
import textwrap
import warnings
from collections.abc import Sequence
from typing import Any

Expand Down Expand Up @@ -58,9 +57,7 @@ def main() -> None:
help="display version",
nargs=0,
)
parser.add_argument(
"url_or_id", help="url or file/folder id (with --id) to download from"
)
parser.add_argument("url_or_id", help="url or file/folder id to download from")
parser.add_argument(
"-O",
"--output",
Expand All @@ -79,11 +76,6 @@ def main() -> None:
action="store_true",
help="(file only) extract Google Drive's file ID",
)
parser.add_argument(
"--id",
action="store_true",
help="[DEPRECATED] flag to specify file/folder id instead of url",
)
parser.add_argument(
"--proxy",
help="<protocol://host:port> download using the specified proxy",
Expand Down Expand Up @@ -138,22 +130,12 @@ def main() -> None:
if args.output == "-":
args.output = sys.stdout.buffer

if args.id:
warnings.warn(
"Option `--id` was deprecated in version 4.3.1 "
"and will be removed in 5.0. You don't need to "
"pass it anymore to use a file ID.",
category=FutureWarning,
)
if re.match("^https?://.*", args.url_or_id):
url = args.url_or_id
id = None
else:
url = None
id = args.url_or_id
else:
if re.match("^https?://.*", args.url_or_id):
url = args.url_or_id
id = None
else:
url = None
id = args.url_or_id

try:
if args.folder:
Expand Down
Loading