1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/bin/sh
get_search_from_EXT_comments (){
_search="${selected_url}"
}
set +f
instances=$(printf "%s\n" "${YTFZF_TEMP_DIR}"/*)
set -f
instance_count=$(echo "$instances" | wc -l)
if [ "$instance_count" -gt 1 ]; then
printf "%s\n" "More than 1 ytfzf instance is running, please select one"
echo "$instances" | sed 's/.*\///' | nl
read -r num
instance="$(echo "$instances" | sed -n "${num}p")"
else
instance="$instances"
fi
read -r selected_url < "${instance}/ids"
[ -z "$selected_url" ] && {
printf "%s\n" "This instance is not playing a video"
}
scrape="comments"
search_source="EXT_comments"
|