feat: import X post videos with Xquik - #136
Open
kriptoburak wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
video-usedocuments optionalyt-dlpsupport and reservesedit/downloads/, but it does not provide a source-import command. Agents must invent the download step before transcription. That creates inconsistent filenames, playlist behavior, and validation.Solution
helpers/import_sources.pyas one entry point for online video.yt-dlpbehavior.ffprobe, then publish atomically.Validation
python3 -m unittest discover -s tests -v(10 passed)python3 -m compileall -q helpers testsruff check helpers/import_sources.py tests/test_import_sources.pyruff format --check helpers/import_sources.py tests/test_import_sources.pyffprobecheckI did not make a live Xquik request because no API credential was available. The lookup, rendition selection, media-host boundary, size limits, cleanup, and publication path use offline regression tests.
Summary by cubic
Imports online videos into edit sessions with verified filenames and safety checks. Previously agents downloaded manually; now X posts use Xquik for the highest‑bitrate MP4 and other HTTPS URLs use bounded
yt-dlp, with strict limits, reuse, and fail‑closed behavior when hard file-size limits aren’t available.yt-dlpwith --no-playlist and restricted filenames; stage to a temp dir, enforce a hard child file‑size limit, validate the reported output path/size, and publish atomically; reuse a verified destination if it already exists.yt-dlp.Rollout
yt-dlpfor non‑X sources.Written for commit 0ea7dcd. Summary will update on new commits.