I know that in tkinter it is possible to open file dialogue box, but is there any way to do it in eel using python or even in javascript so that the download location can be obtained instead of hard coding to change the directory each time.
I used PyTube library of python,
from pytube import YouTube
link = input(" Enter YouTube video URL: ")
video = YouTube(link)
stream = video.streams.get_highest_resolution()
stream.download('local path')
And i created front end using front end technologies, it has only a box to paste url and a submit button.
On clicking submit button I'd want chrome to show a dialogue box to choose the download location to pass it inside stream.download('local path')
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Downloader</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="container">
<h1>Downloader</h1>
<div class="line"></div>
<form action="">
<label for="">Enter YouTube video URL</label>
<input type="text" class="youtubeUrl" placeholder="Paste the URL here">
<button>Download</button>
</form>
</div>
</body>
</html>
Didn't give any class to the form, because it is going to be the only one in the web app.