From fce4339d2bc473c8ac369cada75c3d20a25e44ff Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Mon, 30 Mar 2026 18:32:55 +0200 Subject: [PATCH] Added new yml --- twitter2bsky_daemon.py | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/twitter2bsky_daemon.py b/twitter2bsky_daemon.py index bceb544..04c7911 100644 --- a/twitter2bsky_daemon.py +++ b/twitter2bsky_daemon.py @@ -472,15 +472,26 @@ def download_and_crop_video(video_url, output_path): try: logging.info(f"⬇️ Downloading video source with ffmpeg: {video_url}") - download_cmd = [ - "ffmpeg", - "-y", - "-protocol_whitelist", "file,http,https,tcp,tls,crypto", - "-allowed_extensions", "ALL", - "-i", video_url, - "-c", "copy", - temp_input, - ] + video_url_l = video_url.lower() + + if ".m3u8" in video_url_l: + download_cmd = [ + "ffmpeg", + "-y", + "-protocol_whitelist", "file,http,https,tcp,tls,crypto", + "-allowed_extensions", "ALL", + "-i", video_url, + "-c", "copy", + temp_input, + ] + else: + download_cmd = [ + "ffmpeg", + "-y", + "-i", video_url, + "-c", "copy", + temp_input, + ] download_result = subprocess.run( download_cmd, @@ -543,7 +554,6 @@ def download_and_crop_video(video_url, output_path): except Exception: pass - # --- Main Sync Function --- def sync_feeds(args): logging.info("🔄 Starting sync cycle...")