Coder Social home page Coder Social logo

grab-it's Introduction

GrabIt ๐Ÿ“บ

A REST API to download Youtube videos.

Example Usage

Download a Youtube video using 2 separate GET requests:

You can send the first GET request to https://grab-it.onrender.com/youtube?url=<youtube-video-url> where <youtube-video-url> is the URL to the Youtube video you want to download. Since the server will retrieve the video when it receives the request, it can take a while depending on the size of the video.

The data will contain multiple fields representing the data of the video, but the field you need the most is download_file_id in order to download the file with the second GET request.

{
  "success": false,
  "data": {
    ...
    "download_file_id": "01e15d35-d074-4ca7-9eaa-0acf9ecdf702",
    "duration": 12,
    "duration_string": "12",
    "dynamic_range": "SDR",
    "ext": "webm",
    "filesize_approx": 616626,
    "format": "248 - 1920x1080 (1080p)+251 - audio only (medium)",
    "format_id": "248+251",
    "format_note": "1080p+medium",
    "fps": 25,
    "fulltitle": "10 Seconds Timer with Music",
    "height": 1080,
    ...
  }
}

You will then need to grab the value at download_file_id send the second request to the endpoint https://grab-it.onrender.com/download/<download_file_id>. The server will send back the downloaded Youtube file. The following is an example to download the file in Python:

import wget # pip install wget

download_file_id = "01e15d35-d074-4ca7-9eaa-0acf9ecdf702"
endpoint = "https://grab-it.onrender.com/download/" + download_file_id

wget.download(endpoint, "C:/Users/hoang/Downloads/my_video.webm")

Dev Setup

Required Python3.7 or higher, along with venv and pip installed. You can automate the setup process by running the setup script: python3 bin/setup.py

grab-it's People

Contributors

truongluan303 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.