Switch to yt-dlp (fixes #432)

youtube-dl has no new release since 2021
This commit is contained in:
Pierre Rudloff 2023-03-30 21:41:08 +02:00
parent 9564764633
commit 3e45f19682
No known key found for this signature in database
5 changed files with 20 additions and 28 deletions

View file

@ -24,7 +24,7 @@ class Config
*
* @var string
*/
public string $youtubedl = 'vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py';
public string $youtubedl = 'vendor/yt-dlp/yt-dlp/yt_dlp/__main__.py';
/**
* python binary path.
@ -39,7 +39,13 @@ class Config
* @var string[]
*/
public array $params = [
'--no-warnings', '--ignore-errors', '--flat-playlist', '--restrict-filenames', '--no-playlist'
'--no-warnings',
'--ignore-errors',
'--flat-playlist',
'--restrict-filenames',
'--no-playlist',
'--use-extractors',
'default,-generic',
];
/**

View file

@ -37,7 +37,7 @@
"symfony/translation": "^4.0",
"symfony/yaml": "^4.0",
"webfontkit/open-sans": "^1.0",
"ytdl-org/youtube-dl": "^2021.12",
"yt-dlp/yt-dlp": "^2023.03",
"zonuexe/http-accept-language": "^0.4.1"
},
"require-dev": {
@ -62,11 +62,11 @@
{
"type": "package",
"package": {
"name": "ytdl-org/youtube-dl",
"version": "2021.12.17",
"name": "yt-dlp/yt-dlp",
"version": "2023.03.04",
"dist": {
"type": "tar",
"url": "https://yt-dl.org/downloads/2021.12.17/youtube-dl-2021.12.17.tar.gz"
"url": "https://github.com/yt-dlp/yt-dlp/releases/download/2023.03.04/yt-dlp.tar.gz"
}
}
}
@ -108,11 +108,7 @@
"installer-types": [
"library"
],
"patches": {
"ytdl-org/youtube-dl": {
"Disable the generic extractor": "patches/youtube-dl-disable-generic.diff"
}
}
"patches": {}
},
"scripts": {
"lint": "grumphp run --ansi",

8
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "454753ac2a4d31f21bf2e197b7ce24d1",
"content-hash": "02f288a60af3784e20ca7e1ba9afac4a",
"packages": [
{
"name": "aura/session",
@ -3772,11 +3772,11 @@
"time": "2014-08-20T20:43:34+00:00"
},
{
"name": "ytdl-org/youtube-dl",
"version": "2021.12.17",
"name": "yt-dlp/yt-dlp",
"version": "2023.03.04",
"dist": {
"type": "tar",
"url": "https://yt-dl.org/downloads/2021.12.17/youtube-dl-2021.12.17.tar.gz"
"url": "https://github.com/yt-dlp/yt-dlp/releases/download/2023.03.04/yt-dlp.tar.gz"
},
"type": "library"
},

View file

@ -1,6 +1,6 @@
---
# Path to your youtube-dl binary
youtubedl: vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py
youtubedl: vendor/yt-dlp/yt-dlp/yt_dlp/__main__.py
# Path to your python binary
python: /usr/bin/python
@ -12,6 +12,8 @@ params:
- --flat-playlist
- --restrict-filenames
- --no-playlist
- --use-extractors
- default,-generic
# True to enable audio conversion
convert: false

View file

@ -1,12 +0,0 @@
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index 18d8dbcd6..4d3edfac3 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -13,7 +13,6 @@ except ImportError:
for name, klass in globals().items()
if name.endswith('IE') and name != 'GenericIE'
]
- _ALL_CLASSES.append(GenericIE)
def gen_extractor_classes():