DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: N.A.N.Y. 2017: Youtube Watcher - Linux only  (Read 25,876 times)

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
N.A.N.Y. 2017: Youtube Watcher - Linux only
« on: September 17, 2016, 01:07 AM »
NANY 2017 Entry Information

Application Name Youtube Watcher
Version 0.7.0
Short Description A program to keep track of new videos from users / playlists.
Supported OSes Linux
Web Page https://github.com/Sjc1000/youtube_watcher
Download Link https://github.com/Sjc1000/youtube_watcher/archive/master.zip
System Requirements
  • python3
  • python3-pip


Description
This program keeps track of videos from certain users. You can update to see if they have any new ones.
You can go through the list of new ones and download them right from the program, as either audio or video+audio.

By default it will only show the videos you have not marked as watched. There is a param to turn that off (see https://github.com/Sjc1000/youtube_watcher#params)


Screenshots

1: 1.png
2: 2.png
3: 3.png
4: 4.png

Usage
Installation
https://github.com/Sjc1000/youtube_watcher#installing

Using the Application
https://github.com/Sjc1000/youtube_watcher#running

Known Issues
There are currently no known issues, but I am sure there are some. Please report them on the issues section of the repo if you find any.
« Last Edit: October 14, 2016, 06:05 AM by Sjc1000 »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #1 on: September 17, 2016, 01:11 AM »
neat.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #2 on: September 17, 2016, 08:53 AM »
great idea :up:

maybe I've got to move to Linux :-[
Tom

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #3 on: October 14, 2016, 06:08 AM »
New UI system. Uses curses instead of default printing.
Can now download more than one at once.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #4 on: October 14, 2016, 11:31 AM »
This looks really neat, but I'm wondering why is this Linux only? Isn't Python cross-platform?

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #5 on: October 14, 2016, 04:15 PM »
This looks really neat, but I'm wondering why is this Linux only? Isn't Python cross-platform?

Theoretically, from what I've seen.  I have an issue on a Python archive in Github that it doesn't work on a Mac.  I wish I'd marked it as Windows compatible only, because I can't debug on the Mac.

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #6 on: October 15, 2016, 12:13 AM »
Python is cross platform, and I think youtube-dl is too.

It could work on Windows, I don't have Windows so I can't install / create instructions to get it running. If anyone is able to get python3 and pip on windows you should be able to get it with 'pip install youtube_watcher'.

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #7 on: November 05, 2016, 03:45 AM »
Ah. Turns out Gtk3, the GUI library I use is not on Windows yet. So its not Windows compatible..... yet.....

I don't even use Gtk3 anymore. So its possible it works.

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #8 on: November 16, 2016, 10:20 PM »
After some more digging I found that ncurses doesn't work on Windows. Which is what I use for the UI nowdays. So there is 0 chance it will work.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #9 on: November 16, 2016, 10:30 PM »
:(

Thanks for investigating.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #10 on: November 17, 2016, 05:38 AM »
Not sure how much work would go into using PDCurses (the windows port of ncurses)

http://www.projectpluto.com/win32a.htm

https://github.com/Bill-Gray/PDCurses

Just posting more for information than anything.

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #11 on: November 19, 2016, 03:04 AM »
It's possible that would fix the UI issue. However, there are probably lots of other issues with running this on Windows since I haven't made anything even think about cross platform.

I have no Windows machine (that I can develop on) and no decent internet to download a VM. So I can't develop in a Windows environment, which sucks.

Thanks for the links though.  :D

mattpctech

  • Participant
  • Joined in 2017
  • *
  • Posts: 2
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #12 on: January 20, 2017, 04:15 AM »
I found a link to this project on ghacks.net, and missed the part of it being linux only until after getting it halfway functional. :-\  However, I did manage to get it to run on windows!
I found an unofficial binary for curses at http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses that works, but there is a change that needs to be made to the file __init__.py in AppData\Local\Programs\Python\Python35-32\Lib\site-packages\youtube_watcher

Around line 27 (forgot which line exactly) you need to change
Code: ( python)
FILE_DIR = '{}/.youtube_watcher'.format(os.getenv('HOME'))
to
Code: ( python)
FILE_DIR = "C:\\Users\Matthew\AppData\Local\Programs\Python\Python35-32\Scripts"
(Fixing as your install requires...)
and it will begin working!

There is a small text output bug causing stuff like this during normal command prompt usage:

C:\Windows\System32>youtube_watcher add seananners
Add ←[1mhttps://www.youtube.com/user/SeaNanners←[0m? [y/n] y
Name ←[1mSeaNanners←[0m or :
Do you wish to update the info now? [y/n] y
Updating ←[1mSeaNanners←[0m

However running "youtube_watcher list" works fine, even downloading videos. It saves them correctly to the current directory the command was run from.

Thank you so much for this neat tool!
« Last Edit: January 20, 2017, 04:48 AM by mattpctech »

mattpctech

  • Participant
  • Joined in 2017
  • *
  • Posts: 2
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #13 on: January 20, 2017, 04:25 AM »
Upon further testing I did run into a problem. It seems after you mark a video as seen it disappears from the interface. Looks like the curses port is not quite up to what is needed quite yet.
youtubewatcher.PNG
I don't know python well enough to troubleshoot any further than the fix I managed earlier, but the tool still works great for downloading videos!

Sjc1000

  • Member
  • Joined in 2012
  • **
  • Posts: 23
    • Participated in NANY Challenge Three Times
    • Linux User
Re: N.A.N.Y. 2017: Youtube Watcher - Linux only
« Reply #14 on: January 20, 2017, 07:18 AM »
If you run it with `youtube_watcher list NAME -s`  you will also get a list of the seen videos, but by default it will only show un-seen ones.

Thanks for getting this working though, Im not sure what is causing that print bug, however.

EDIT:

I also forgot to mention that it works very well inside Windows 10's new bash shell thing.

Original address: https://www.donationcoder.com/forum/index.php?topic=43019.0