<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Digital Dev Dairy]]></title><description><![CDATA[Learn Digital Marketing, Development and Daily Smart Tips in the simplest way]]></description><link>https://blog.rajkumarprince.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 01:51:19 GMT</lastBuildDate><atom:link href="https://blog.rajkumarprince.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to create youtube video Downloader]]></title><description><![CDATA[Have you saw a you tube video Downloader website that have millions of traffic every month and builder of that website are earning thousands of Doller from that website and as a Developer you think that what happen if i also able to create this type ...]]></description><link>https://blog.rajkumarprince.dev/how-to-create-youtube-video-downloader</link><guid isPermaLink="true">https://blog.rajkumarprince.dev/how-to-create-youtube-video-downloader</guid><category><![CDATA[Node.js]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Python]]></category><category><![CDATA[webdev]]></category><category><![CDATA[FastAPI]]></category><category><![CDATA[Flask Framework]]></category><dc:creator><![CDATA[Rajkumar Verma]]></dc:creator><pubDate>Mon, 01 Dec 2025 13:32:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1764595705834/d972b9d4-33e8-44d7-a975-a305ebbfeaea.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Have you saw a you tube video Downloader website that have millions of traffic every month and builder of that website are earning thousands of Doller from that website and as a Developer you think that what happen if i also able to create this type of website, then i can able to pay my Collage Fee or Do college party. Then you land to right Article. In this Article. I will guide you that how you can also build this type of website.</p>
<p>To Build a you tube video Downloader website you must know some Guideline of you tube that If you downloaded you tube video outside of youtube this is illegal according to <a target="_blank" href="https://www.youtube.com/static?template=terms&amp;utm_source=chatgpt.com">youtube Term &amp; Condition</a>. But For Educational purpose or for personal use if you want to build. Then Python and Node js Is most popular for this type website Backend But some people also prefer to PHP.</p>
<h2 id="heading-why-you-should-follow-this-article">Why you should Follow this article</h2>
<p>I am a full stack developer in MERN stack but I also use fast Api for backed because this fast and I love this Automatic Documentation. I Have build a fully Functional website that support multiple platform video downloader called <a target="_blank" href="http://socailsaver.app">socailsaver.app</a> using same method that i am guiding you. So you can confidently trust on this article.</p>
<h2 id="heading-how-to-build-youtube-video-downloader-using-python">How to Build youtube video Downloader using python</h2>
<p>To Build youtube video Downloader website using python you need to use a most popular universal video Downloader python library called yt-dlp. This library will help us to build and achieve video downloader website goal in easy and fast minor and for fronted you can use any fronted framework or Library like React, Vue , Next js or other according to you.</p>
<h3 id="heading-tool-you-need-to-use">Tool you need to Use :-</h3>
<ol>
<li><p>Python as a programing language.</p>
</li>
<li><p>Any one Backend framework to build Backed like FastApi, Django or flask. My suggestion is FastApi</p>
</li>
<li><p>Yt-dlp for video Downloading process</p>
</li>
<li><p>One fronted library or framework to deign UI</p>
</li>
</ol>
<p>To Build Downloader website using python. first start with setting up deployment environment. So you can build and test app in local before deployment.</p>
<h3 id="heading-this-is-not-development-server-setup-guide-so-please-refer-this-guide-to-setup-development-environment">This is not development server setup guide So please. Refer this guide to setup development environment</h3>
<ol>
<li><p>Refer this guide to setup development server using flask</p>
</li>
<li><p>Refer this guide to setup development server using dingo environment</p>
</li>
<li><p>Refer this guide to setup development server using Django</p>
</li>
</ol>
<p>After setup up development server install yt-dlp as a dependencies using this command</p>
<pre><code class="lang-jsx">pip install yt-dlp
</code></pre>
<h3 id="heading-build-youtube-video-downloader-using-flask">Build Youtube video Downloader using Flask</h3>
<p>After setup development environment. Now we are ready to build import yt-dlp and create a new endpoint/API called video and inside this write code spawn a new yt-dlp process every time when even come a new request to that endpoint and send response Downloadable video URL as response.</p>
<p>Here is full code:-</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">import</span> subprocess
<span class="hljs-keyword">import</span> json

<span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> Flask, request, jsonify
<span class="hljs-keyword">from</span> flask_limiter <span class="hljs-keyword">import</span> Limiter
<span class="hljs-keyword">from</span> flask_limiter.util <span class="hljs-keyword">import</span> get_remote_address

# -----------------------------------
# Helper <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">to</span> <span class="hljs-title">spawn</span> <span class="hljs-title">yt</span>-<span class="hljs-title">dlp</span>
# -----------------------------------
<span class="hljs-title">def</span> <span class="hljs-title">get_video_url</span>(<span class="hljs-params">video_url</span>):
    <span class="hljs-title">command</span> = [
        "<span class="hljs-title">yt</span>-<span class="hljs-title">dlp</span>",
        "--<span class="hljs-title">no</span>-<span class="hljs-title">warnings</span>",
        "-<span class="hljs-title">J</span>",         # <span class="hljs-title">Output</span> <span class="hljs-title">metadata</span> <span class="hljs-title">as</span> <span class="hljs-title">JSON</span>
        <span class="hljs-title">video_url</span>
    ]

    <span class="hljs-title">try</span>:
        <span class="hljs-title">result</span> = <span class="hljs-title">subprocess</span>.<span class="hljs-title">run</span>(<span class="hljs-params">
            command,
            capture_output=True,
            text=True,
            timeout=<span class="hljs-number">25</span>
        </span>)

        <span class="hljs-title">if</span> <span class="hljs-title">result</span>.<span class="hljs-title">returncode</span> != 0:
            <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params">result.stderr</span>)

        <span class="hljs-title">data</span> = <span class="hljs-title">json</span>.<span class="hljs-title">loads</span>(<span class="hljs-params">result.stdout</span>)
        <span class="hljs-title">formats</span> = <span class="hljs-title">data</span>.<span class="hljs-title">get</span>(<span class="hljs-params"><span class="hljs-string">"formats"</span>, []</span>)

        <span class="hljs-title">if</span> <span class="hljs-title">not</span> <span class="hljs-title">formats</span>:
            <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params"><span class="hljs-string">"No downloadable formats found"</span></span>)

        # <span class="hljs-title">Best</span> <span class="hljs-title">quality</span> = <span class="hljs-title">last</span> <span class="hljs-title">format</span>
        <span class="hljs-title">downloadable_url</span> = <span class="hljs-title">formats</span>[-1].<span class="hljs-title">get</span>(<span class="hljs-params"><span class="hljs-string">"url"</span></span>)

        <span class="hljs-title">if</span> <span class="hljs-title">not</span> <span class="hljs-title">downloadable_url</span>:
            <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params"><span class="hljs-string">"Could not extract download link"</span></span>)

        <span class="hljs-title">return</span> <span class="hljs-title">downloadable_url</span>

    <span class="hljs-title">except</span> <span class="hljs-title">Exception</span> <span class="hljs-title">as</span> <span class="hljs-title">e</span>:
        <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params">f<span class="hljs-string">"Failed to process video: {str(e)}"</span></span>)

# -----------------------------------
# <span class="hljs-title">Flask</span> <span class="hljs-title">App</span> <span class="hljs-title">Setup</span>
# -----------------------------------
<span class="hljs-title">app</span> = <span class="hljs-title">Flask</span>(<span class="hljs-params">__name__</span>)

# <span class="hljs-title">Rate</span> <span class="hljs-title">limit</span>: 10 <span class="hljs-title">requests</span>/<span class="hljs-title">min</span> <span class="hljs-title">per</span> <span class="hljs-title">IP</span>
<span class="hljs-title">limiter</span> = <span class="hljs-title">Limiter</span>(<span class="hljs-params">
    key_func=get_remote_address,
    app=app,
    default_limits=[<span class="hljs-string">"10 per minute"</span>]
</span>)

# -----------------------------------
# /<span class="hljs-title">video</span> <span class="hljs-title">endpoint</span> (<span class="hljs-params">GET + query param</span>)
# -----------------------------------
@<span class="hljs-title">app</span>.<span class="hljs-title">route</span>(<span class="hljs-params"><span class="hljs-string">"/video"</span>, methods=[<span class="hljs-string">"GET"</span>]</span>)
@<span class="hljs-title">limiter</span>.<span class="hljs-title">limit</span>(<span class="hljs-params"><span class="hljs-string">"10 per minute"</span></span>)
<span class="hljs-title">def</span> <span class="hljs-title">video</span>(<span class="hljs-params"></span>):
    <span class="hljs-title">try</span>:
        <span class="hljs-title">video_url</span> = <span class="hljs-title">request</span>.<span class="hljs-title">args</span>.<span class="hljs-title">get</span>(<span class="hljs-params"><span class="hljs-string">"url"</span></span>)  # &lt;-- <span class="hljs-title">query</span> <span class="hljs-title">param</span>

        <span class="hljs-title">if</span> <span class="hljs-title">not</span> <span class="hljs-title">video_url</span>:
            <span class="hljs-title">return</span> <span class="hljs-title">jsonify</span>(<span class="hljs-params">{<span class="hljs-string">"error"</span>: <span class="hljs-string">"Missing required parameter: url"</span>}</span>), 400

        <span class="hljs-title">download_url</span> = <span class="hljs-title">get_video_url</span>(<span class="hljs-params">video_url</span>)

        <span class="hljs-title">return</span> <span class="hljs-title">jsonify</span>(<span class="hljs-params">{
            <span class="hljs-string">"status"</span>: <span class="hljs-string">"success"</span>,
            <span class="hljs-string">"download_url"</span>: download_url
        }</span>)

    <span class="hljs-title">except</span> <span class="hljs-title">Exception</span> <span class="hljs-title">as</span> <span class="hljs-title">e</span>:
        <span class="hljs-title">return</span> <span class="hljs-title">jsonify</span>(<span class="hljs-params">{<span class="hljs-string">"error"</span>: str(e)}</span>), 500

<span class="hljs-title">if</span> <span class="hljs-title">__name__</span> == "<span class="hljs-title">__main__</span>":
    <span class="hljs-title">app</span>.<span class="hljs-title">run</span>(<span class="hljs-params">debug=True</span>)</span>
</code></pre>
<p>It will return Downloadable video URL as response</p>
<pre><code class="lang-jsx">{
<span class="hljs-string">"download_url"</span>: <span class="hljs-string">"&lt;https://rr3---sn-ci5gup-cvhez.googlevideo.com/videoplayback?expire=1764613669&amp;ei=xIktafTjNo33pt8P3eyUsAw&amp;ip=2401%3A4900%3A36b4%3Ad362%3A3d55%3A66d7%3A6c63%3Af098&amp;id=o-APl5OTkaqigVBUN8cgcBq98B1d0rr1p73QMLrukZVbI_&amp;itag=401&amp;source=youtube&amp;requiressl=yes&amp;xpc=EgVo2aDSNQ%3D%3D&amp;cps=436&amp;met=1764592068%2C&amp;mh=7c&amp;mm=31%2C26&amp;mn=sn-ci5gup-cvhez%2Csn-h5576nsl&amp;ms=au%2Conr&amp;mv=m&amp;mvi=3&amp;pl=48&amp;rms=au%2Cau&amp;initcwndbps=370000&amp;bui=AdEuB5TNOmcFPFHB1yyezoWLf_fF5X8c3bx_0KNGtha2JR9-htLmll8d7JuEHqN6kDZEABzRX10798jM&amp;spc=6b0G_PI1HDOCpfPy4w&amp;vprv=1&amp;svpuc=1&amp;mime=video%2Fmp4&amp;rqh=1&amp;gir=yes&amp;clen=238254945&amp;dur=213.040&amp;lmt=1749085188214713&amp;mt=1764591681&amp;fvip=1&amp;keepalive=yes&amp;fexp=51552689%2C51565115%2C51565681%2C51580968&amp;c=ANDROID&amp;txp=4532534&amp;sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&amp;sig=AJfQdSswRQIgZvUbtZxJ-iq_HT1LbrKYV3YKrMl_zMpTWsjOpzHajHwCIQD3EA3Oansga4Pipz9IaLPqE6I7tt5c7YCh1aYYiMncPw%3D%3D&amp;lsparams=cps%2Cmet%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&amp;lsig=APaTxxMwRAIgfkeYoPH3_q27lSXNn-YozBc3o85VSwK62E2XnzEo604CID3d793yc7sN9HvXyMtKfJofhpkGZCzWET2IiDbjmjWS&gt;"</span>,
<span class="hljs-string">"status"</span>: <span class="hljs-string">"success"</span>
}
</code></pre>
<h3 id="heading-build-you-tube-video-downloader-using-fastapi">Build You tube video Downloader using FastApi</h3>
<p>I have already told you how to build using flask but problem in flask that this is not optimize for production grade security, load and performance so please use FastApi.</p>
<p>To build using fastApi follow this</p>
<ol>
<li><p>setup development environment</p>
</li>
<li><p>install this yt-dlp, fastApi and other based on what functionality you want to add extra</p>
</li>
<li><p>After that import yt-dlp and express and create a end point for video download</p>
</li>
<li><p>Inside that Api run yt-dlp using spawn or direct native library calling</p>
</li>
<li><p>To customize any functionality of yt-dlp <a target="_blank" href="https://pypi.org/project/yt-dlp/2021.3.7/">refer their docs</a></p>
</li>
</ol>
<p>here is code</p>
<pre><code class="lang-jsx"><span class="hljs-keyword">from</span> fastapi <span class="hljs-keyword">import</span> FastAPI, Request, HTTPException
<span class="hljs-keyword">from</span> fastapi.responses <span class="hljs-keyword">import</span> JSONResponse
<span class="hljs-keyword">from</span> slowapi <span class="hljs-keyword">import</span> Limiter
<span class="hljs-keyword">from</span> slowapi.util <span class="hljs-keyword">import</span> get_remote_address
<span class="hljs-keyword">from</span> slowapi.errors <span class="hljs-keyword">import</span> RateLimitExceeded

<span class="hljs-keyword">import</span> subprocess
<span class="hljs-keyword">import</span> json

# ------------------------------------
# FastAPI App &amp; Rate Limiter
# ------------------------------------
limiter = Limiter(key_func=get_remote_address)

app = FastAPI()

# Rate limit error handler
@app.exception_handler(RateLimitExceeded)
def rate_limit_handler(request, exc):
    <span class="hljs-keyword">return</span> JSONResponse(
        status_code=<span class="hljs-number">429</span>,
        content={<span class="hljs-string">"error"</span>: <span class="hljs-string">"Too many requests. Try again later."</span>}
    )

# ------------------------------------
# Helper <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">to</span> <span class="hljs-title">spawn</span> <span class="hljs-title">yt</span>-<span class="hljs-title">dlp</span>
# ------------------------------------
<span class="hljs-title">def</span> <span class="hljs-title">get_download_link</span>(<span class="hljs-params">video_url: str</span>):
    <span class="hljs-title">command</span> = [
        "<span class="hljs-title">yt</span>-<span class="hljs-title">dlp</span>",
        "--<span class="hljs-title">no</span>-<span class="hljs-title">warnings</span>",
        "-<span class="hljs-title">J</span>",        # <span class="hljs-title">Return</span> <span class="hljs-title">metadata</span> <span class="hljs-title">as</span> <span class="hljs-title">JSON</span>
        <span class="hljs-title">video_url</span>
    ]

    <span class="hljs-title">result</span> = <span class="hljs-title">subprocess</span>.<span class="hljs-title">run</span>(<span class="hljs-params">
        command,
        capture_output=True,
        text=True,
        timeout=<span class="hljs-number">25</span>
    </span>)

    <span class="hljs-title">if</span> <span class="hljs-title">result</span>.<span class="hljs-title">returncode</span> != 0:
        <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params">result.stderr.strip()</span>)

    <span class="hljs-title">data</span> = <span class="hljs-title">json</span>.<span class="hljs-title">loads</span>(<span class="hljs-params">result.stdout</span>)
    <span class="hljs-title">formats</span> = <span class="hljs-title">data</span>.<span class="hljs-title">get</span>(<span class="hljs-params"><span class="hljs-string">"formats"</span>, []</span>)

    <span class="hljs-title">if</span> <span class="hljs-title">not</span> <span class="hljs-title">formats</span>:
        <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params"><span class="hljs-string">"No downloadable formats found"</span></span>)

    # <span class="hljs-title">Best</span> <span class="hljs-title">quality</span> = <span class="hljs-title">last</span> <span class="hljs-title">format</span> <span class="hljs-title">entry</span>
    <span class="hljs-title">download_link</span> = <span class="hljs-title">formats</span>[-1].<span class="hljs-title">get</span>(<span class="hljs-params"><span class="hljs-string">"url"</span></span>)

    <span class="hljs-title">if</span> <span class="hljs-title">not</span> <span class="hljs-title">download_link</span>:
        <span class="hljs-title">raise</span> <span class="hljs-title">Exception</span>(<span class="hljs-params"><span class="hljs-string">"Failed to extract video URL"</span></span>)

    <span class="hljs-title">return</span> <span class="hljs-title">download_link</span>

# ------------------------------------
# /<span class="hljs-title">video</span> <span class="hljs-title">Endpoint</span> (<span class="hljs-params">GET</span>)
# ------------------------------------
@<span class="hljs-title">app</span>.<span class="hljs-title">get</span>(<span class="hljs-params"><span class="hljs-string">"/video"</span></span>)
@<span class="hljs-title">limiter</span>.<span class="hljs-title">limit</span>(<span class="hljs-params"><span class="hljs-string">"10/minute"</span></span>)
<span class="hljs-title">def</span> <span class="hljs-title">video</span>(<span class="hljs-params">request: Request, url: str</span>):
    <span class="hljs-title">try</span>:
        <span class="hljs-title">download_url</span> = <span class="hljs-title">get_download_link</span>(<span class="hljs-params">url</span>)
        <span class="hljs-title">return</span> </span>{<span class="hljs-string">"status"</span>: <span class="hljs-string">"success"</span>, <span class="hljs-string">"download_url"</span>: download_url}

    except Exception <span class="hljs-keyword">as</span> e:
        raise HTTPException(status_code=<span class="hljs-number">500</span>, detail=str(e))
</code></pre>
<h2 id="heading-how-to-build-youtube-video-downloader-using-nodejs">How to build Youtube Video Downloader using nodejs</h2>
<p>Now let's talk how to build using node js. Node js is a very popular runtime environment for building backed in node js but this is less performing so i add it later.</p>
<p>To Build you tube video downloader using node js you have two option fist use <a target="_blank" href="https://www.npmjs.com/package/ytdl-core">ytdl-core</a> that is rapper on top of <a target="_blank" href="https://github.com/yt-dlp/yt-dlp">yt-dlp</a> and also more optimize and second use yt-dlp directly using node exe() function and node child_process . This guide on how to youtube video downloader using python i will not guide you how to setup development environment for node.</p>
<p>follow this step to build this</p>
<ol>
<li><p>first setup devlopment server</p>
</li>
<li><p>install this yt-dlp, express and other based on what functionality you added extra</p>
</li>
<li><p>After that import yt-dlp and express and create a end point for video download</p>
</li>
<li><p>Inside that Api run yt-dlp using node exe() function or child_process then</p>
</li>
<li><p>To customize any functionality of yt-dlp <a target="_blank" href="https://pypi.org/project/yt-dlp/2021.3.7/">refer their docs</a></p>
</li>
</ol>
<p>Here is final code</p>
<p>Run this command on your terminal before running this code</p>
<pre><code class="lang-jsx">npm install express express-rate-limit
</code></pre>
<pre><code class="lang-jsx"><span class="hljs-keyword">const</span> express = <span class="hljs-built_in">require</span>(<span class="hljs-string">"express"</span>);
<span class="hljs-keyword">const</span> rateLimit = <span class="hljs-built_in">require</span>(<span class="hljs-string">"express-rate-limit"</span>);
<span class="hljs-keyword">const</span> { spawn } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"child_process"</span>);

<span class="hljs-keyword">const</span> app = express();

<span class="hljs-comment">// ------------------------------</span>
<span class="hljs-comment">// Rate Limiting (10 requests/min)</span>
<span class="hljs-comment">// ------------------------------</span>
<span class="hljs-keyword">const</span> limiter = rateLimit({
  <span class="hljs-attr">windowMs</span>: <span class="hljs-number">60</span> * <span class="hljs-number">1000</span>, <span class="hljs-comment">// 1 min</span>
  <span class="hljs-attr">max</span>: <span class="hljs-number">10</span>,
  <span class="hljs-attr">message</span>: { <span class="hljs-attr">error</span>: <span class="hljs-string">"Too many requests. Try again later."</span> }
});

app.use(limiter);

<span class="hljs-comment">// ------------------------------</span>
<span class="hljs-comment">// Helper: Spawn yt-dlp process</span>
<span class="hljs-comment">// ------------------------------</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getVideoUrl</span>(<span class="hljs-params">videoUrl</span>) </span>{
  <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function">(<span class="hljs-params">resolve, reject</span>) =&gt;</span> {
    <span class="hljs-keyword">const</span> ytdlp = spawn(<span class="hljs-string">"yt-dlp"</span>, [
      <span class="hljs-string">"--no-warnings"</span>,
      <span class="hljs-string">"-J"</span>,          <span class="hljs-comment">// Output metadata as JSON</span>
      videoUrl
    ]);

    <span class="hljs-keyword">let</span> output = <span class="hljs-string">""</span>;
    <span class="hljs-keyword">let</span> errorOutput = <span class="hljs-string">""</span>;

    ytdlp.stdout.on(<span class="hljs-string">"data"</span>, <span class="hljs-function">(<span class="hljs-params">data</span>) =&gt;</span> {
      output += data.toString();
    });

    ytdlp.stderr.on(<span class="hljs-string">"data"</span>, <span class="hljs-function">(<span class="hljs-params">data</span>) =&gt;</span> {
      errorOutput += data.toString();
    });

    ytdlp.on(<span class="hljs-string">"close"</span>, <span class="hljs-function">(<span class="hljs-params">code</span>) =&gt;</span> {
      <span class="hljs-keyword">if</span> (code !== <span class="hljs-number">0</span>) {
        <span class="hljs-keyword">return</span> reject(errorOutput || <span class="hljs-string">"yt-dlp failed"</span>);
      }

      <span class="hljs-keyword">try</span> {
        <span class="hljs-keyword">const</span> jsonData = <span class="hljs-built_in">JSON</span>.parse(output);
        <span class="hljs-keyword">const</span> formats = jsonData.formats || [];

        <span class="hljs-keyword">if</span> (!formats.length) {
          <span class="hljs-keyword">return</span> reject(<span class="hljs-string">"No downloadable formats found"</span>);
        }

        <span class="hljs-comment">// Best quality (last format)</span>
        <span class="hljs-keyword">const</span> downloadUrl = formats[formats.length - <span class="hljs-number">1</span>].url;

        <span class="hljs-keyword">if</span> (!downloadUrl) {
          <span class="hljs-keyword">return</span> reject(<span class="hljs-string">"Failed to extract download link"</span>);
        }

        resolve(downloadUrl);
      } <span class="hljs-keyword">catch</span> (err) {
        reject(<span class="hljs-string">"Failed to parse yt-dlp output"</span>);
      }
    });
  });
}

<span class="hljs-comment">// ------------------------------</span>
<span class="hljs-comment">// /video endpoint (GET + Query Param)</span>
<span class="hljs-comment">// ------------------------------</span>
app.get(<span class="hljs-string">"/video"</span>, <span class="hljs-keyword">async</span> (req, res) =&gt; {
  <span class="hljs-keyword">try</span> {
    <span class="hljs-keyword">const</span> videoUrl = req.query.url;

    <span class="hljs-keyword">if</span> (!videoUrl) {
      <span class="hljs-keyword">return</span> res.status(<span class="hljs-number">400</span>).json({ <span class="hljs-attr">error</span>: <span class="hljs-string">"Missing required parameter: url"</span> });
    }

    <span class="hljs-keyword">const</span> downloadUrl = <span class="hljs-keyword">await</span> getVideoUrl(videoUrl);

    res.json({
      <span class="hljs-attr">status</span>: <span class="hljs-string">"success"</span>,
      <span class="hljs-attr">download_url</span>: downloadUrl
    });

  } <span class="hljs-keyword">catch</span> (err) {
    res.status(<span class="hljs-number">500</span>).json({ <span class="hljs-attr">error</span>: err.toString() });
  }
});

<span class="hljs-comment">// ------------------------------</span>
app.listen(<span class="hljs-number">5000</span>, <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Server running at &lt;http://127.0.0.1:5000&gt;"</span>);
});
</code></pre>
<p>To test use this</p>
<pre><code class="lang-jsx">&lt;http:<span class="hljs-comment">//127.0.0.1:5000/video?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&gt;</span>
</code></pre>
<p>As a smart developer try to take help of chatgpt if any issues you face. Best of Luck</p>
<p>Use this for batter response</p>
<p><a target="_blank" href="https://chatgpt.com/share/692d8b28-1c40-8004-998e-bc3cc9cbf7c4">https://chatgpt.com/share/692d8b28-1c40-8004-998e-bc3cc9cbf7c4</a></p>
]]></content:encoded></item><item><title><![CDATA[How To Claim ChatGPT for Free]]></title><description><![CDATA[Chat GPT is the world's most popular ai plateform in this time that offer user multiple feature like text generation, image generation, codeing, presonal guidance and many more but this before yestraday many option of this powerfull tool loked under ...]]></description><link>https://blog.rajkumarprince.dev/how-to-claim-chatgpt-for-free</link><guid isPermaLink="true">https://blog.rajkumarprince.dev/how-to-claim-chatgpt-for-free</guid><category><![CDATA[chatgpt]]></category><category><![CDATA[AI]]></category><category><![CDATA[gpt chat free]]></category><category><![CDATA[ChatGPT Pro]]></category><dc:creator><![CDATA[Rajkumar Verma]]></dc:creator><pubDate>Tue, 04 Nov 2025 04:43:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228519225/671c6040-b7b1-4a64-935b-581efed9853a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Chat GPT is the world's most popular ai plateform in this time that offer user multiple feature like text generation, image generation, codeing, presonal guidance and many more but this before yestraday many option of this powerfull tool loked under chat gpt pro subscription so many use like lower middle class person and student not able to afford this due to fincial reason anf for that some days ago elon mask twitte on twitter i will giving chat gpt pro for all indian user for free from 4 nomber 2025 so anyone can utilize ai full potinyial on their daily work and today is 4 nomber when i am writeing this article to guide you how to clam chat gpt for free.</p>
<h2 id="heading-requriment-to-claim-this-offer">Requriment to claim this offer</h2>
<ol>
<li><p>You have a valid ChatGPT Account. If you do not have an account sign up</p>
</li>
<li><p>If you already have an account, you need to log in</p>
</li>
<li><p>An Indian citizen</p>
</li>
<li><p>A valid payment method</p>
</li>
</ol>
<h2 id="heading-here-is-quick-guide">Here is quick guide:-</h2>
<ol>
<li><p>click to profile go to account</p>
</li>
<li><p>click to upgrade button</p>
</li>
<li><p>Fill in your details and select payment method</p>
</li>
<li><p>Set up auto pay</p>
</li>
<li><p>Now you are ready to use Chat GPT pro for free</p>
</li>
</ol>
<h2 id="heading-here-is-the-step-by-step-guide-how-to-claim">Here is the step-by-step guide how to claim</h2>
<p>After intro about chat gpt now talk how to claim to calim follow this gudie step by step</p>
<ol>
<li>Open Chat GPT in your browser or smartphone application, you will see an upgrade for free button at the top. If you are not able to see don’t worry follow next step.</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228736822/b268a722-b4d9-4698-bcf0-403ddcd640d4.png" alt class="image--center mx-auto" /></p>
<ol start="2">
<li>click to profile and got to setting</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228889230/78a171c0-d9c0-4d5c-8514-a28585e0d111.png" alt class="image--center mx-auto" /></p>
<ol start="3">
<li>click to account and now you can see upgrade button click on that</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228905645/f1535317-d9a4-44ec-82ca-dce721409a9d.png" alt class="image--center mx-auto" /></p>
<ol start="4">
<li>After cliking that you can see rs 399 for free click on that</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228930124/7ce42c85-e849-4248-9081-42ee8afd73c3.png" alt class="image--center mx-auto" /></p>
<p>you will redrict to payment page where fill you details like name, adress and email rember use name same as chat gpt account and do’t change gmail for smooth experience. After filling that select you payment method</p>
<h3 id="heading-there-are-two-pyment-method-available-to-claim-chatgpt-pro">There are two pyment method available to claim chatGPT pro</h3>
<ol>
<li><p>Using card like dabit or cradit</p>
<p> if you want to use a card, then just enter the card number, expire date and cvv and click to subscribe many people on raddid and quora tell that he not reccive any otp but if you ask for otp just entar and you good to go</p>
</li>
<li><p>Using UPI</p>
<p> if you want to use UPI, then enter upi id and click to subscribe button in UPI app like gpay, PhonePe or other reccive a request to uprove just entar you pin and you good to go.</p>
</li>
</ol>
<p>select any mehod and setup auto pay.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762230557336/c64df1af-2a49-43e9-94b6-db58a2e58b4d.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228971002/64fd5708-83a2-4a53-ac90-b212332c2227.png" alt class="image--center mx-auto" /></p>
<ol start="5">
<li>If Every thing going in correct minor you will receive this type of conformation mail. Now you can Enjoy chatGPt pro for free.</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762228993487/07a79b0b-b73d-4db4-808c-ecb70853c0ba.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762229006562/a912134b-de06-42b0-b671-715498d92069.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item></channel></rss>