-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a php API and demo page #152
Comments
Showing status (and probably aborting, too) seems surprisingly difficult. I think we can trick around by the following:
Abort now works like this:
Showing progress works like this:
All in all, rather complicated, but achievable. |
Since the php code may be nontrivial, it should be developed outside of the main repository. |
Did this ever get moved out to some other repo/forked? Is there work going on? A smooth browser interface would be extremely convenient. |
I too am curious what is the status of this issue. |
I'm really keen to get the downloading progress in my PHP application. I patched a previous version to output a .progress file every second and then used PHP to poll it. But with the latest required update I have lost my patch. Would it be possible to add an output of current progress? |
My thoughts on this was to just implement a sqlite database that multiple youtube-dl instances could access and update. This would allow multiple instances of youtube-dl to run, while allowing a single (or multiple) frontend(s) to read the sqlite database for updates on the running processes. This would be an easier update to youtube-dl than writing an API layer(or at least in my mind it is). I'm interested myself in adding this functionality, unfortunately python isn't a language I am familiar with, but I have enough free time that I am willing to "give it a go". |
@glisignoli That sounds like a really good idea for processing a bunch of youtube videos!! Maybe even using a worker service like resque or sidekiq! We could have a really decent server solution that we can just pass videos to using an api. |
@phihag - I found one of you examples at http://www.verious.com/qa/youtube-dl-and-php-exec/ Don't suppose you have any others out there to share? |
Check this for help on some issues. |
PHP file " ; } ``` ?> SH file ping -c1 "www.google.com" 2>&1 > /dev/null if [ $? -ne 0 ]; then |
@SpEcHiDe Your script is quite dangerous. Imagine the POST data:
Anyway, pass |
This can be done by mere sanitize the data.I have tried where the index page takes user input url.A session cookie is auto injected.When the user clicks on submit button the ajax requests post the data which is sanitized along with user ip,cookie and store it in mariadb(I have tried in mariadb,so this will also work for mysql or percona db). ydl_opts and my_hook can be customized to form a json which can be shown to the user as actual download status. The only issue left here is how to send back user to download the complete file.It was internal so not a big deal. |
I have tried the json part https://github.com/siddht1/youtube_dl_embed/blob/master/1.py ,this will create a file a.json which can be used as an api feature.Merge this with https://github.com/siddht3/table_json_creator to create a api type. Things still missing are url provided and extractor details.Which I suppose my_hook has. |
It isn't example, but full site: https://github.com/Rudloff/alltube If you want create simple youtube-dl server it's better use NODE: https://www.npmjs.com/package/youtube-dl |
youtube-dl is often embedded by php applications. There should be an example php page included, with the following features:
This may require an additional output option in youtube-dl, for example the ability to output JSON sentences.
The text was updated successfully, but these errors were encountered: