Skip to content
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

How do i automatically update URL each time when a user entered a new url #24177

Closed
bigsandip opened this issue Feb 28, 2020 · 1 comment
Closed

Comments

@bigsandip
Copy link

@bigsandip bigsandip commented Feb 28, 2020

Checklist

  • [ x] I'm asking a question
  • [x ] I've looked through the README and FAQ for similar questions
  • [x ] I've searched the bugtracker for similar questions including closed ones

Question

Iam building a simple video downloader from any website in django. Whenever a user entered a url in a url field i capture it in views.py by URL_LIST = form.cleaned_data['url'] .Now i want to automatically update url in this line ("youtube-dl -f best --output ~/Downloads/%(title)s.%(ext)s -ik --format mp4 --yes-playlist **URL_LIST** ") .I know another way is to write the user entered url to a .txt file and read from it like os.system("youtube-dl -f best --output ~/Downloads/%(title)s.%(ext)s -ik --format mp4 --yes-playlist -a list.txt ") but some reason the server didnt give read/write permission to list.txt file in production.

@bigsandip bigsandip added the question label Feb 28, 2020
@bigsandip bigsandip changed the title How do i automatically update URL each time when a user entered a new new How do i automatically update URL each time when a user entered a new url Feb 28, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 28, 2020

Use python string formatting obviously.

@dstftw dstftw closed this Feb 28, 2020
@dstftw dstftw added the offtopic label Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.