[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
31
ARCHIVE_legacy_scripts/test_pytube.py
Normal file
31
ARCHIVE_legacy_scripts/test_pytube.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from pytube import YouTube
|
||||
import traceback
|
||||
import sys # Importiere sys für den Modulzugriff
|
||||
|
||||
VIDEO_URL = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' # Oder eine andere Test-URL
|
||||
|
||||
try:
|
||||
# Versuche, den Pfad des pytube-Moduls auszugeben
|
||||
pytube_module = sys.modules[YouTube.__module__]
|
||||
print(f"Pytube Modulpfad: {pytube_module.__file__}")
|
||||
except Exception as e_path:
|
||||
print(f"Konnte Pytube Modulpfad nicht ermitteln: {e_path}")
|
||||
|
||||
print(f"Versuche, Infos für Video abzurufen: {VIDEO_URL}")
|
||||
try:
|
||||
yt = YouTube(VIDEO_URL)
|
||||
print(f"Titel: {yt.title}")
|
||||
# Dieser Aufruf ist oft der kritische Punkt, der den Fehler auslöst
|
||||
print(f"Verfügbare Streams (Anzahl): {len(yt.streams)}")
|
||||
stream = yt.streams.filter(progressive=True, file_extension='mp4').first()
|
||||
if stream:
|
||||
print(f"Erfolgreich einen progressiven MP4 Stream gefunden: {stream.itag}")
|
||||
else:
|
||||
print("Keinen progressiven MP4 Stream gefunden.")
|
||||
|
||||
except Exception as e:
|
||||
print("\nEin Fehler ist aufgetreten im Haupt-Try-Block:")
|
||||
print(f"Fehlertyp: {type(e)}")
|
||||
print(f"Fehlermeldung: {str(e)}")
|
||||
print("Traceback:")
|
||||
traceback.print_exc()
|
||||
Reference in New Issue
Block a user