Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
How do i automatically update URL each time when a user entered a new url #24177
Comments
|
Use python string formatting obviously. |
Checklist
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 likeos.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.