getting browser cookies & talking
This commit is contained in:
parent
db72246364
commit
3742ad8841
|
@ -108,7 +108,7 @@ if [[ ! ${TIDDLER} ]]; then
|
|||
[[ ! $TITLE ]] && echo "NO TITLE" && continue
|
||||
|
||||
echo ".... Downloading $TITLE.mp4"
|
||||
|
||||
espeak "$TITLE" > /dev/null 1>&2
|
||||
# https://github.com/yt-dlp/yt-dlp#format-selection-examples
|
||||
# SUBS ? --write-subs --write-auto-subs --sub-langs "fr, en, en-orig" --embed-subs
|
||||
# (bv*[height<=720][vcodec~='^((he|a)vc|h26[45])']+ba)
|
||||
|
@ -141,6 +141,7 @@ if [[ ! ${TIDDLER} ]]; then
|
|||
|
||||
## LIMIT TO 12 MAXIMUM COPY PER DAY PER PLAYER
|
||||
boucle=$((boucle+1))
|
||||
espeak "$bouche video" > /dev/null 1>&2
|
||||
[[ $boucle == 13 ]] && echo "MAXIMUM COPY REACHED" && break
|
||||
|
||||
####################################################
|
||||
|
|
|
@ -58,6 +58,8 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
|||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ $IPFSNODEID == "" ]] && echo "IPFSNODEID manquant" && espeak "IPFS NODE ID Missing" && exit 1
|
||||
|
||||
BROWSER=$(xdg-settings get default-web-browser | cut -d '.' -f 1 | cut -d '-' -f 1) ## GET cookies-from-browser
|
||||
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
|
||||
|
@ -486,6 +488,7 @@ then
|
|||
|
||||
# Download mp3 from 1st youtube search video result (--write-info-json)
|
||||
/usr/local/bin/youtube-dl --default-search ytsearch1: \
|
||||
--cookies-from-browser $BROWSER \
|
||||
--ignore-errors --no-mtime \
|
||||
--embed-thumbnail --metadata-from-title "%(artist)s - %(title)s" --add-metadata \
|
||||
--extract-audio --audio-format mp3 -o "${YTEMP}/%(id)s&%(title)s.%(ext)s" "$artist $song"
|
||||
|
|
Loading…
Reference in New Issue