diff --git a/share/Makefile.am b/share/Makefile.am index dd54d153a3..568fe96d85 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -104,8 +104,6 @@ nobase_dist_pkgdata_SCRIPTS = \ utils/audio-vlc-default.sh \ utils/video-vlc-default.sh \ $(NULL) - -dist_pkgdata_SCRIPTS = ytdl-extract.py endif EXTRA_DIST += \ diff --git a/share/ytdl-extract.py b/share/ytdl-extract.py deleted file mode 100755 index cc0797ea0b..0000000000 --- a/share/ytdl-extract.py +++ /dev/null @@ -1,46 +0,0 @@ -#! /usr/bin/python3 -# -# Copyright (C) 2020 Rémi Denis-Courmont -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - -import sys -import json -import yt_dlp - -class logger(object): - def debug(self, msg): - pass - - def warning(self, msg): - pass - - def error(self, msg): - sys.stderr.write(msg + '\n') - -def url_extract(url): - opts = { - 'extract_flat': 'in_playlist', - 'logger': logger(), - } - - dl = yt_dlp.YoutubeDL(opts) - - # Process a given URL - infos = dl.extract_info(url, download=False) - print(json.dumps(dl.sanitize_info(infos))) - -url = sys.argv[1] -url_extract(url)