Skip to content

Commit

Permalink
8.3-rc8 (#308 #309 #310)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanBindez committed Nov 3, 2024
1 parent e1ab123 commit 9e08dae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
VERSION=8
MINOR=3
PATCH=
EXTRAVERSION="-rc7"
EXTRAVERSION="-rc8"

NOTES="(#308 #309 #310)"
BRANCH="dev"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pytubefix"
version = "8.3-rc7"
version = "8.3-rc8"
authors = [
{ name="Juan Bindez", email="[email protected]" },
]
Expand Down
27 changes: 14 additions & 13 deletions pytubefix/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,18 @@ def _perform_args_on_youtube(youtube: YouTube, args: argparse.Namespace) -> None
if args.build_playback_report:
build_playback_report(youtube)

oauth = False
cache = False

if args.oauth:
oauth = True
cache = True

print("Loading video...")
youtube = YouTube(args.url, use_oauth=oauth, allow_oauth_cache=cache)

download_highest_resolution_progressive(youtube=youtube, resolution="highest", target=args.target)


def main():
parser = argparse.ArgumentParser(description=main.__doc__)
Expand All @@ -324,7 +336,7 @@ def main():

if "/playlist" in args.url:
print("Loading playlist...")
playlist = Playlist(args.url, use_oauth=oauth, allow_oauth_cache=cache)
playlist = Playlist(args.url)
args.target = args.target or safe_filename(playlist.title)

for youtube_video in playlist.videos:
Expand All @@ -334,20 +346,9 @@ def main():
print(f"There was an error with video: {youtube_video}")
print(e)

oauth = False
cache = False

if args.oauth:
oauth = True
cache = True

print("Loading video...")
youtube = YouTube(args.url, use_oauth=oauth, allow_oauth_cache=cache)
_perform_args_on_youtube(youtube, args)

else:
print("Loading video...")
youtube = YouTube(args.url, use_oauth=oauth, allow_oauth_cache=cache)
youtube = YouTube(args.url)
_perform_args_on_youtube(youtube, args)

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion pytubefix/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "8.3-rc7"
__version__ = "8.3-rc8"

if __name__ == "__main__":
print(__version__)

0 comments on commit 9e08dae

Please sign in to comment.