python-20 / video-downloader

A python application to download videos
GNU General Public License v3.0
10 stars 10 forks source link

Feature/checker. Solved #64. #79

Open AlexPHorta opened 4 years ago

AlexPHorta commented 4 years ago

Finished the URL checker. These are the choices I made:

  1. I added the checker in gui.py around the original error code from the YouTubeVideo object, so it's easy to grasp if the error is being caught from the URL checker or the underlying YouTube downloader (pytube in this case);
  2. I had to add one dependency, 'tld', to isolate the domain. The only direct calls to tld are from updateTldList() and from checkUrl(), so it's easy to remove the dependency if needed. The main workload of the checker is done by urllib.parser.

So, that's it. I hope you like it.