Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 375ca10

Browse files
committed
Replace youtube-dl to yt-dlp
1 parent 7b7b6cf commit 375ca10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

twitter_video_tools/platform_video_downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Optional
22

33
from playwright.sync_api import sync_playwright
4-
from youtube_dl.utils import YoutubeDLError
4+
from yt_dlp.utils import YoutubeDLError
55

66
from twitter_video_tools.monsnode_parser import MonsnodeParser
77

twitter_video_tools/utils/youtube_dl_wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Optional
22

3-
import youtube_dl
3+
import yt_dlp
44

55
from .execute_parallel import execute_parallel
66

@@ -9,8 +9,8 @@ class YoutubeDLWrapper: # pylint: disable=too-few-public-methods
99
"""A YoutubeDL wrapper class for supporting python embedded multi-processing"""
1010

1111
def _youtube_dl_download_video(self, link: str, youtube_dl_option: Optional[dict[str, str]] = None) -> None:
12-
with youtube_dl.YoutubeDL(youtube_dl_option) as youtube_dl_downloader:
13-
youtube_dl_downloader: youtube_dl.YoutubeDL
12+
with yt_dlp.YoutubeDL(youtube_dl_option) as youtube_dl_downloader:
13+
youtube_dl_downloader: yt_dlp.YoutubeDL
1414
youtube_dl_downloader.download([link])
1515

1616
def download(self, links: list[str], youtube_dl_option: Optional[dict[str, str]] = None) -> None:

0 commit comments

Comments
 (0)