Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

rajwebconsulting/youtube-downloader-api-extension

Repository files navigation

RajWebConsulting

This Project is outdated and no longer Maintained.

YouTube to MP3 Converter and MP4 Downloader API extension.

This script is an extension for MP3 Converter Pro v3 from RajWebConsulting and enables you to install Single/Multi Button, Widget and Search APIs on multiple Domains and consuming the JSON API of the Main MP3 Converter Pro v3 (MCP) and YouTube Video Backend v3 installation, to have a SOLID infrastructure (by using File Caching and saving CPU ressources by avoid multiple MCP instances on same Server.).
  • Main Version requires a MP3 Converter Pro v3 and YouTube Video Backend License v3 from RajWebConsulting

Main Sponsor

https://ytconvert.me

Donations

  • Each Donation is helpful. Thank you so much for supporting me.

Buy Me A Coffee

Demo

  • Please see a running DEMO on the domain of my Main Sponsor.

Installation

This package requires Nodejs version 16.13.0 to build the app.

  1. Download the zip file from Github.

  2. install dependencies via npm.

npm install
  1. rename the .env.example file to .env and edit the example variables
# App name (Title)
APP_NAME="YouTube to MP3 APIs"

# Domain where you want to install this app
APP_DOMAIN=http://example.com

# Domain of MP3 Converter Pro v3
APP_API_URL=https://example.com

# Domain of YouTube Video Backend v3
APP_BACKEND_URL=https://backend.example.com

# API Key generated in YouTube Video Backend Admin Panel
APP_BACKEND_API_KEY=YOUR_API_KEY

# Support for Popup Ads. (Will add Script tag to body)
# Paste only the URL to external script here. Dont add full script tags.
APP_API_ADS="https://myAdCompany.com/script123" # leave it empty for no ads
APP_SEARCH_ADS="https://myAdCompany.com/script123" # leave it empty for no ads
  1. Build for production
npm run build
npm run generate
  1. Copy .htaccess file from server folder to dist folder

  2. Set your Domain Working directory to /dist folder


If u getting CORS error then Modify MP3 Converter Pro

change in config/cors.php

'paths' => ['sanctum/csrf-cookie'],

to

'paths' => ['sanctum/csrf-cookie', 'api/*'],

remove from app/Http/Controllers/ApiController.php

Line 402: header('Access-Control-Allow-Origin: ' . $protocol . '://' . $referer);

Line 409: header('Access-Control-Allow-Origin: *');