Last active
January 23, 2021 07:02
-
-
Save rodrigo-x/06d49e551b12a6beba10c2f6c4216aa5 to your computer and use it in GitHub Desktop.
Getting youtube subscriptions auto.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install python requirement libs | |
# shell$> sudo pip install -r requirement_python.txt | |
webbrowser | |
tkinter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import webbrowser | |
import tkinter as tk | |
from tkinter import messagebox as mb | |
def callback(): | |
url = 'https://www.youtube.com/feed/subscriptions' | |
if mb.askyesno('Abrir o browser', 'Deseja abrir o YouTube?'): | |
# Specific Browser | |
# windows-default = default windows browser. | |
webbrowser.get('windows-default').open(url) | |
else: | |
mb.showinfo('Abrir o Browser', 'Comando abortado.') | |
tk.Button(text='Clique', command=callback).pack(fill=tk.X) | |
tk.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment