« Youtube downloader : yt-dlp » : différence entre les versions
De www.yakakliker.org
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 16 : | Ligne 16 : | ||
https://stackoverflow.com/questions/32104702/youtube-dl-library-and-error-403-forbidden-when-using-generated-direct-link-by | https://stackoverflow.com/questions/32104702/youtube-dl-library-and-error-403-forbidden-when-using-generated-direct-link-by | ||
=== Petit script === | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/bash | |||
## Les variables | |||
: ${VAR01=whiptail} | |||
: ${url=} | |||
<html> | ############ Les variables | ||
export selection="(◕_◕)" | |||
export var25042301="(°_°)" | |||
export var25070203="°(◕_◕)°" | |||
export ver="PRY.260607" | |||
export var24051101 | |||
var24051101=$(date +%y%m%d) # Variable date année-mois-jour | |||
# Variables couleurs --- Pour faire sympa --- Oh la belle bleue ! | |||
export red="\033[31m" # Rouge | |||
export turquoise="\033[36m" # Turquoise | |||
export gras="\033[1m" # Gras | |||
export rougegras="\033[1;31m" # Rouge Gras | |||
export reset="\033[0m" | |||
export alert="root=,red;window=,white;border=black,white;textbox=black,white;button=red,white" | |||
export info="root=,blue;window=,white;border=black,white;textbox=black,white;button=red,white" | |||
fct001(){ | |||
url=$(NEWT_COLORS="$info" whiptail --title "$ver" --inputbox "Entrez l'URL" 10 60 3>&1 1>&2 2>&3) | |||
#yt-dlp -x --audio-format m4a $url | |||
yt-dlp --js-runtime node --remote-components ejs:github --cookies-from-browser chrome -x --audio-format m4a "$url" | |||
fct999 | |||
} | |||
fct002(){ | |||
url=$(NEWT_COLORS="$info" whiptail --title "$ver" --inputbox "Entrez l'URL" 10 60 3>&1 1>&2 2>&3) | |||
#yt-dlp --cookies-from-browser chrome -x --audio-format m4a $url --no-playlist | |||
yt-dlp --js-runtime node --remote-components ejs:github --cookies-from-browser chrome -x --audio-format m4a --no-playlist "$url" | |||
fct999 | |||
} | |||
##################################################### | |||
fct995() { | |||
############# Sélection de l'action à exécuter ############################ | |||
var25062504=$(NEWT_COLORS="$info" whiptail --menu "$var25070203 : Que souhaitez vous faire ?" --title "$ver" 25 60 15 \ | |||
"fct001" " Télécharger une playlist" \ | |||
"fct002" " Télécharger une chanson" \ | |||
3>&1 1>&2 2>&3) | |||
exitstatus=$? | |||
if [ $exitstatus = 0 ]; then | |||
$var25062504 # Lancement de la fonction choisie | |||
else | |||
fct999 | |||
fi | |||
} | |||
######################################################### | |||
############# Fin du script ############################ | |||
fct999() { | |||
echo "(◕_◕) : That's all folks !" # Information de fin d'exécution du script | |||
} | |||
#### The Ultimate Software ! #### | |||
fct995 | |||
## That's all | |||
</syntaxhighlight> <html> | |||
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a> | <a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a> | ||
</html> | </html> | ||
Version du 6 juillet 2026 à 15:54
sudo apt update && sudo apt install quickjs nodejs
python3 -m pip install yt-dlp -U
curl -fsSL https://deno.land/install.sh | sudo DENO_INSTALL=/usr/local sh
yt-dlp --js-runtime node --cookies-from-browser chrome -x --audio-format m4a --no-playlist "URL"
yt-dlp --remote-components ejs:github --cookies-from-browser chrome -x --audio-format m4a --no-playlist "URL"
https://github.com/yt-dlp/yt-dlp/discussions/285
Petit script
#!/bin/bash
## Les variables
: ${VAR01=whiptail}
: ${url=}
############ Les variables
export selection="(◕_◕)"
export var25042301="(°_°)"
export var25070203="°(◕_◕)°"
export ver="PRY.260607"
export var24051101
var24051101=$(date +%y%m%d) # Variable date année-mois-jour
# Variables couleurs --- Pour faire sympa --- Oh la belle bleue !
export red="\033[31m" # Rouge
export turquoise="\033[36m" # Turquoise
export gras="\033[1m" # Gras
export rougegras="\033[1;31m" # Rouge Gras
export reset="\033[0m"
export alert="root=,red;window=,white;border=black,white;textbox=black,white;button=red,white"
export info="root=,blue;window=,white;border=black,white;textbox=black,white;button=red,white"
fct001(){
url=$(NEWT_COLORS="$info" whiptail --title "$ver" --inputbox "Entrez l'URL" 10 60 3>&1 1>&2 2>&3)
#yt-dlp -x --audio-format m4a $url
yt-dlp --js-runtime node --remote-components ejs:github --cookies-from-browser chrome -x --audio-format m4a "$url"
fct999
}
fct002(){
url=$(NEWT_COLORS="$info" whiptail --title "$ver" --inputbox "Entrez l'URL" 10 60 3>&1 1>&2 2>&3)
#yt-dlp --cookies-from-browser chrome -x --audio-format m4a $url --no-playlist
yt-dlp --js-runtime node --remote-components ejs:github --cookies-from-browser chrome -x --audio-format m4a --no-playlist "$url"
fct999
}
#####################################################
fct995() {
############# Sélection de l'action à exécuter ############################
var25062504=$(NEWT_COLORS="$info" whiptail --menu "$var25070203 : Que souhaitez vous faire ?" --title "$ver" 25 60 15 \
"fct001" " Télécharger une playlist" \
"fct002" " Télécharger une chanson" \
3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
$var25062504 # Lancement de la fonction choisie
else
fct999
fi
}
#########################################################
############# Fin du script ############################
fct999() {
echo "(◕_◕) : That's all folks !" # Information de fin d'exécution du script
}
#### The Ultimate Software ! ####
fct995
## That's all