diff --git a/twitchdl/commands/download.py b/twitchdl/commands/download.py index 2d563b8..6819ac3 100644 --- a/twitchdl/commands/download.py +++ b/twitchdl/commands/download.py @@ -274,7 +274,7 @@ def _download_video(video_id, args): args.overwrite = True print_out("Fetching access token...") - access_token = twitch.get_access_token(video_id) + access_token = twitch.get_access_token(video_id, auth_token=args.auth) print_out("Fetching playlists...") playlists_m3u8 = twitch.get_playlists(video_id, access_token) diff --git a/twitchdl/console.py b/twitchdl/console.py index f9031e3..0f31d68 100644 --- a/twitchdl/console.py +++ b/twitchdl/console.py @@ -176,6 +176,13 @@ COMMANDS = [ "help": "Video quality, e.g. 720p. Set to 'source' to get best quality.", "type": str, }), + (["-a", "--auth"], { + "help": "Authentication token, passed to Twitch to access subscriber only " + "VODs. Can be copied from the 'auth_token' cookie in any browser " + "logged in on Twitch.", + "type": str, + "default": None, + }), (["--no-join"], { "help": "Don't run ffmpeg to join the downloaded vods, implies --keep.", "action": "store_true",