INNER CODE UNIT · Python

joined_stream

xcodian/youtube-dl-web · server/src/server.py:38

    async def joined_stream():
        # attach the first chunk back to the generator
        yield first_chunk

        # pass on the rest
        async for chunk in stream:
            yield chunk

    # pass that to the user
    return StreamingResponse(
        joined_stream(),
        media_type = mime_type,
        headers = headers
    )

@app.get("/meta/{video_id}")
async def api_meta(video_id: str):
    meta = query_meta(video_id)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…