youtube-dl-subscriptions
youtube-dl-subscriptions copied to clipboard
Improved how last.txt is handled
Currently, last.txt
is created on the first run, but the script doesn't do anything else on this first time.
With my PR, if last.txt
does not exist, or if its content is invalid (issue #4), the current timestamp is used instead. Consequently, there is no need to run the script twice on the first run anymore.
I also applied flake8
on the code to clean it up against pep8 rules, and reorganized a little bit the code into functions for better readability.