get_episode: fixed a crash for podcasts with missing description

This commit is contained in:
sigma67 2025-07-24 21:15:24 +02:00 • committed by sigma67
commit 4506c7eb12
4 changed files with 11 additions and 8 deletions

View file

@ -191,11 +191,6 @@ class TestBrowsing:
assert song.start_time <= song.end_time
assert isinstance(song.id, int)
playlist = yt.get_watch_playlist(config["uploads"]["private_upload_id"])
assert playlist["lyrics"] is None
with pytest.raises(Exception):
yt.get_lyrics(playlist["lyrics"])
def test_get_signatureTimestamp(self, yt):
signature_timestamp = yt.get_signatureTimestamp()
assert signature_timestamp is not None

View file

@ -1,3 +1,6 @@
import pytest
class TestExplore:
def test_get_mood_playlists(self, yt):
categories = yt.get_mood_categories()
@ -7,6 +10,7 @@ class TestExplore:
playlists = yt.get_mood_playlists(categories[cat][0]["params"])
assert len(playlists) > 0
@pytest.mark.skip(reason="disabled for now due to #787")
def test_get_charts(self, yt, yt_oauth):
charts = yt_oauth.get_charts()
# songs section appears to be removed currently (US)

View file

@ -44,7 +44,7 @@ class TestPodcasts:
results = yt.search("episode", filter="episodes")
for result in results:
result = yt.get_episode(result["videoId"])
assert len(result["description"].text) > 0
assert result["description"] is None or len(result["description"].text) > 0
def test_get_episodes_playlist(self, yt_brand):
playlist = yt_brand.get_episodes_playlist()