bpiyush commited on
Commit
e38eb25
1 Parent(s): cdac373

Minor: removes pytube dependency

Browse files
Files changed (1) hide show
  1. download_youtube.py +2 -2
download_youtube.py CHANGED
@@ -1,11 +1,10 @@
1
  """Util functions to download videos from youtube."""
2
- from pytube import YouTube
3
- import yt_dlp
4
  from glob import glob
5
  import os
6
 
7
 
8
  def download_youtube_video_pytube(video_id, save_path="."):
 
9
  url = f"https://www.youtube.com/watch?v={video_id}"
10
  try:
11
  # Create a YouTube object
@@ -22,6 +21,7 @@ def download_youtube_video_pytube(video_id, save_path="."):
22
 
23
 
24
  def download_youtube_video_ytdlp(video_id, save_dir="/tmp/"):
 
25
  try:
26
  # Construct the URL using the video ID
27
  url = f"https://www.youtube.com/watch?v={video_id}"
 
1
  """Util functions to download videos from youtube."""
 
 
2
  from glob import glob
3
  import os
4
 
5
 
6
  def download_youtube_video_pytube(video_id, save_path="."):
7
+ from pytube import YouTube
8
  url = f"https://www.youtube.com/watch?v={video_id}"
9
  try:
10
  # Create a YouTube object
 
21
 
22
 
23
  def download_youtube_video_ytdlp(video_id, save_dir="/tmp/"):
24
+ import yt_dlp
25
  try:
26
  # Construct the URL using the video ID
27
  url = f"https://www.youtube.com/watch?v={video_id}"