faas-and-furious / youtube-dl

Download YouTube videos as a function
27 stars 19 forks source link

Update entry.sh #2

Closed 0xdevalias closed 7 years ago

0xdevalias commented 7 years ago

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

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.

0xdevalias commented 7 years ago

Ideally, when this gets merged, someone should build/push the image as well.