fix: programs is reusable after stream
This commit is contained in:
parent
9051a25fb8
commit
9f237c71c8
8
main.py
8
main.py
@ -1,8 +1,8 @@
|
||||
from tinydb import TinyDB, Query
|
||||
from bs4 import BeautifulSoup
|
||||
import requests
|
||||
import os
|
||||
from simple_term_menu import TerminalMenu
|
||||
import subprocess
|
||||
|
||||
db = TinyDB("./database.json", indent=4)
|
||||
query = Query()
|
||||
@ -43,7 +43,7 @@ while True:
|
||||
lst.append(element.text)
|
||||
terminal_menu = TerminalMenu(lst)
|
||||
file = soup.findAll("a")[terminal_menu.show()]["href"]
|
||||
url = url + file
|
||||
if (not file.endswith("/")):
|
||||
print(f"vlc '{url}'")
|
||||
os.system(f"vlc '{url}'")
|
||||
subprocess.run(f"vlc '{url + file}'", shell=True)
|
||||
else:
|
||||
url = url + file
|
||||
|
Loading…
Reference in New Issue
Block a user