Open RyanSamman opened 4 years ago
for the RegexMatchError, to reproduce you need to enter a valid url that has not a youtube parsable ID, elseit's going to parse, try changing "watch" for "vatch" and it will parse. Crazy, huh?
I propose we change
self.btnOK.clicked.connect(self.enterURL)
For the time being this change will do
def enterURL(self):
""" When OK button is pressed.
Retreive information of the video using pytube using the URL entered and process it
"""
link = self.lineEditURL.text()
global ytube
try:
ytube = YouTube(link, on_progress_callback=self.download_progress)
except:
self.showPopUp("URL is not a valid Youtube Video")
return
But I think we should introduce an even robust validation. For the time being we can use simple validation that videos can come only from youtube.com domain or similar. And then introduce a workaround that.
With this, we can check both first and second "invalid links" tasks.
Older useful ideas & Comments:
~ Backend
Catch errors, potentially display them as a popup
[ ] We may want to unshorten the URL just in case
[ ] Add documentation of GUI elements and useful methods
~ GUI
Add a dropdown menu with all the streams (for now, later we will filter it)
[ ] Save the last download folder path & other data into a JSON
[x] Fix the space in the popup message
[ ] Make the
Clear
button actually functional[ ] Add more elements to the UI to be able to show various data about the video (Views likes dislikes subscriber subs description etc)