As best I can tell.. the previous entry.sh doesn't actually work.. Not sure if it ever did, or what the story is, but now gives:
$ echo https://www.youtube.com/watch?v=BBJa32lCaaY | faas-cli invoke youtubedlServer returned unexpected status code: 500 - exit status 2
https://www.youtube.com/watch?v=BBJa32lCaaY
Usage: youtube-dl [options] url [url...]
youtube-dl: error: you must provide at least one URL
As best I can tell.. the previous entry.sh doesn't actually work.. Not sure if it ever did, or what the story is, but now gives:
https://stackoverflow.com/questions/16854280/a-variable-modified-inside-a-while-loop-is-not-remembered reads as though the $line variable would never be set outside of the while.
This new method looks like it will work correctly based on local testing.