Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungYour agent picks one of two options. Can you test that choice?(23.09.2026 um 01:10 Uhr)
Sichere ProgrammierungWe audited 110 AI usage tools. Here is where the numbers go wrong.(23.09.2026 um 01:12 Uhr)
Sichere ProgrammierungWhy Does Your AI Coding Agent Start Forgetting What It Was Doing?(23.09.2026 um 01:19 Uhr)
Sichere ProgrammierungYour agent picks one of two options. Can you test that choice?(23.09.2026 um 01:10 Uhr)
Sichere ProgrammierungWe audited 110 AI usage tools. Here is where the numbers go wrong.(23.09.2026 um 01:12 Uhr)
Sichere ProgrammierungWhy Does Your AI Coding Agent Start Forgetting What It Was Doing?(23.09.2026 um 01:19 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

YouTube-Video-Manager-with-SQLite3

A simple Python CLI app to manage YouTube video data using SQLite3. Supports adding, listing, updating, deleting, and searching videos with duration (HH:MM format). Great for beginners learning CRUD operations and database integration in…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

A simple Python CLI app to manage YouTube video data using SQLite3. Supports adding, listing, updating, deleting, and searching videos with duration (HH:MM format). Great for beginners learning CRUD operations and database integration in Python.



🚀 Features- ✅ Add new video entries with custom duration (supports hours beyond 24) 🔍 Search videos by partial or full name 📝 Update existing video details (name or time) ❌ Delete videos by ID 📋 List all stored videos in a clean format 🗃 SQLite3 database for persistent storage 💻 Command-line user interface



🛠️ Technologies Used- Python 3 SQLite3 (Built-in Python module) datetime for time formatting.




import sqlite3

connection = sqlite3.connect('YouTube_Videos.db')

cursor = connection.cursor()

cursor.execute('''
CREATE TABLE IF NOT EXISTS videos (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
time TEXT NOT NULL
);
''')

def get_time():
while True:
time_input = input("Enter Video time (HH:MM): ")
if ":" in time_input:
hh, mm = time_input.split(":")
if hh.isdigit() and mm.isdigit():
hh = int(hh)
mm = int(mm)
if 0 <= mm < 60:
return f"{hh:02d}:{mm:02d}"
print("Invalid time format. Please use HH:MM where hours can be any number and minutes 0-59.")

def list_videos():
cursor.execute("SELECT * FROM videos")
for row in cursor.fetchall():
print(row)

def add_video(name, time):
cursor.execute("INSERT INTO videos (name, time) VALUES (?, ?)", (name, time))
connection.commit()
print("- Success! Your video has been added to the library. -")

def update_video(video_id, new_name, new_time):
cursor.execute("UPDATE videos SET name = ?, time = ? WHERE id = ?", (new_name, new_time, video_id))
connection.commit()
print("- Success! Your video has been updated. -")


def delete_video(video_id):
cursor.execute("DELETE FROM videos where id = ?",(video_id,))
connection.commit()
print("- Video deleted successfully! -")

def search_video(video_name):
cursor.execute("SELECT id, name, time FROM videos WHERE name LIKE ?", ('%' + video_name + '%',))
results = cursor.fetchall()
if results:
for video_id, name, time in results:
print("_" * 25)
print(f"ID : {video_id}")
print(f"Name : {name}")
print(f"Duration : {time}")
print("_" * 25)
else:
print("- Video is not found -")

def main():
while True:
print("\nYOUTUBE MANAGER 💼🚀 with DB")
print("Choose an option:")
print("1. List YouTube Videos")
print("2. Add Videos")
print("3. Search Videos")
print("4. Update Videos")
print("5. Delete Videos")
print("6. Exit app")
choice = input("Enter your choice: ")

if choice == '1':
print("-" * 25)
list_videos()
print("-" * 25)
elif choice == '2':
name = input("Enter the video name: ").capitalize()
time = get_time()
add_video(name, time)
elif choice == '3':
video_name = input("Enter Video name to search: ").capitalize()
search_video(video_name)
elif choice == '4':
list_videos()
video_id = input("Enter video ID to Update: ")
new_name = input("Enter the New name of Video: ")
new_time = input("Enter the New time of Video: ")
update_video(video_id, new_name, new_time)
elif choice == '5':
list_videos()
video_id = input("Enter video ID to Delete: ")
delete_video(video_id)
elif choice == '6':
break
else:
print("Invalid Choice")

connection.close()

if __name__ == "__main__":
main()


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten YouTube-Video-Manager-with-SQLite3

Thematisch verwandte Begriffe: YouTubeVideoManagerwithSQLite3 · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-17636 | IBM Financial Transaction Manager (FTM) for RedHat OpenShift could allow…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick