Skip to content

Commit

Permalink
new debates
Browse files Browse the repository at this point in the history
  • Loading branch information
colobas committed Feb 14, 2024
1 parent a657779 commit 0fba667
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
5 changes: 4 additions & 1 deletion process_debates.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def process_debate(*, title, url, output_root, gdrive_service, skip_transcriptio
m3u8_url, thumbnail_url = find_m3u8_and_thumbnail(url)
if m3u8_url is None or thumbnail_url is None:
logging.warning(f"Could not find m3u8 or thumbnail for {url}")
return
return {"title": title, "thumbnail": thumbnail_url, "slug": slug}

slug = slugify(title)
audio_path = output_root / f"media/{slug}.mp3"
Expand Down Expand Up @@ -271,6 +271,9 @@ def main(args):
if output_path.exists() and not args.force:
continue

if debate is None:
continue

summary = process_debate(**debate, output_root=output_root, skip_transcription=args.skip_transcription, gdrive_service=gdrive_service, skip_upload=args.skip_upload)
master_json.append(summary)

Expand Down
45 changes: 45 additions & 0 deletions src/debates.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,50 @@
"title": "Livre vs IL",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12901/p12901_1_20240207000000e002t8819.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "livre-vs-il"
},
{
"title": "Livre vs PS",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12900/p12900_2_20240209000000e003t2868.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "livre-vs-ps"
},
{
"title": "PSD vs PCP",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12900/p12900_2_20240210000000e004t1350.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "psd-vs-pcp"
},
{
"title": "IL vs PAN",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12899/p12899_1_20240209000000e004t6009.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "il-vs-pan"
},
{
"title": "Chega vs PCP",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12901/p12901_1_20240209000000e003t0509.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "chega-vs-pcp"
},
{
"title": "BE vs Chega",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12900/p12900_1_20240213224338e006t6815.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "be-vs-chega"
},
{
"title": "PSD vs Chega",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12900/p12900_2_2024021215609.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "psd-vs-chega"
},
{
"title": "BE vs PCP",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12899/p12899_1_2024021215588.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "be-vs-pcp"
},
{
"title": "PSD vs PAN",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12899/p12899_1_20240211000000e005t3623.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "psd-vs-pan"
},
{
"title": "PS vs PAN",
"thumbnail": "https://cdn-images.rtp.pt/multimedia/screenshots/p12901/p12901_1_20240210000000e004t8847.jpg?q=100&format=pjpg&auto=webp&v=3&w=400",
"slug": "ps-vs-pan"
}
]

0 comments on commit 0fba667

Please sign in to comment.