Giter VIP home page Giter VIP logo

vidsrc-api's Introduction

vidsrc-api

Status Deployment

STATUS- WORKING - (UPDATED MAR/31/24)

  • Added stable fixes for most of the sources so it wont break too often.
  • Everything Works currently and the speed has also increased in the latest commit dut o use of non-blocking async functions.
  • Still the code may have some bugs,so feel free to post bugs in the issue section :)

A simple web scrapper based on this resolver.

About

  • Deploying methods.

    • Any Platform

      Project specifically made to run on vercel,but easy to deploy on other platforms.Just check the running fastapi on the specific platform.

    • Vercel

      Project is easy to deploy on vercel.

      1. Fork this repo.

      2. Open vercel and create new project and choose your forked repo.

      3. Use the default settings and click deploy.

      4. Your build will surely fail because of this

        img

        *vercel's latest update.Node.js version 20.x dosent fully support python.

      5. Now open the project's settings and scroll down.Now you can see a row caled Node Version. CHANGE it to 18.x

        img

        *there's an detailed explanation in this issue link

    • Vercel easy

      Or if vercel fixes this bug,you can use this button.But vercel didnt fix this yet.

      Deploy with Vercel

      IMPORTANT : Vercel is facing a bug recently so setting node version to 18.x is a fix for it.

      *there's an detailed explanation in this issue link

  • Running it locally

    1.Fork and Clone the repo.

    2.Create a virtial env if you want.

    3.install the deps.[pip install -r requirements.txt]

    4.open models/utils.py and change the value of BASE to your api-base-url/deployment-base-url.( for subtitle )

    5.install uvicorn via pip install uvicorn & run it using uvicorn.[uvicorn main:app --reload --port=8000]

  • If you liked the project and updates buy me a coffee :)

  • If any issues,drop an issue on github issues.

FEATURES

- async support - Most process are async but still some fixes are needed.
- very fast results
- subtitle support for every sources.

NOTES

- Dont overload the deployment.
- This api is made for educational purpouse only. This is just a simple scrapper built arround `https://github.com/Ciarands` vidsrc downloader.This project was only made to prevent ads and redirects caused by the `iframe`s
- This api isnt a copy of the inspired project,but its a complete reqrite of code to make it work as an api and use async style to give vary fast results.
- Dont perform bulk request to the api and store the m3u8's returned,cuz they may not work after 24 hours or so.This api scrape websites that have `video on demand` feature so storing it is useless.

USAGE (GET)

  • example base url: https://api.vercel.app

  • endpoints:

    • /vidsrc/{db_id} - vidsrc.to
    • /vsrcme/{db_id} - vidsrc.me
    • /streams/{db_id} - get streams from all 4 sources in one request.
    • /subs/?url={[email protected]}
  • parameters:

    • s - season (series only)
    • e - episodes (series only)
    • l - language(subtitle)
  • example url (movie) : https://api.vercel.app/vidsrc/ttXXXXXX

  • example url (series) : https://api.vercel.app/vidsrc/ttXXXXXX?s=1&e=2

RESPONSE SCEMA

[UPDATE] Added a common response scheam for the endpoints,so every source is an element of an array.And the api retruns an array.

  • Working
{
    "status":200,
    "info":"success",
    "sources":[
      {
        "name": "SOURCE_NAME",
        "data": {
          "stream": "FILE.m3u8",
          "subtitle": [
            {
              "lang":"LANGUAGE",
              "file":"FILE.srt"
            }
            {
              "lang":"LANGUAGE2",
              "file":"FILE2.srt"
            }
          ]
        }
      },
      {
        "name": "SOURCE_NAME2",
        "data": {
          "stream": "FILE2.m3u8",
          "subtitle": [
            {
              "lang":"LANGUAGE",
              "file":"FILE.srt"
            }
            {
              "lang":"LANGUAGE2",
              "file":"FILE2.srt"
            }
          ]
        }
      }
    ]
}
  • Error/Stream Unavailable
{
    "status":200,
    "info":"success",
    "sources":[]
}

### ERROR CODES

ERROR CODES

TODO


### OTHER PROJECTS
- [cool-proxy](https://github.com/cool-dev-guy/cool-proxy) - A proxy made in C++

vidsrc-api's People

Contributors

cool-dev-guy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vidsrc-api's Issues

Usage of the tool

Hey amazing repo , and really useful. I was wondering how can I use this to scrape movies out of https://fmoviesz.to/home since this website uses vidsrc as a primary provider for almost everything it has.

Fetch filemoon embed url

Hello cool guy thank you so much for this, i just want to ask u if it's possible to fetch embed url of filemoon server i want to clone files to my account thanks and what file i can modify

Sorry, you have been blocked?

hi how would i get around this ? i have tried a vpn and proxies etc but it still says this from cloudflare?

an y help or ideas would be great :)

Screenshot 2024-04-04 125912

How to get episode source from seasons?

I want to get an episode for a specific season. like I want to get game of Thrones season 1 episode 1 source.

parameters:

s - season (series only)
e - episodes (series only)
l - language(subtitle)

I don' understand this parameters.

can you tell me the example endpoint for series/season/episode?

support with localhost needed

how do you host it locally please help with local it just gets stuck on loop and doesnt provide any results, says Internal Server Error

INFO: Will watch for changes in these directories: ['C:\Users\theju\Desktop\vidsrc-api']
INFO: Uvicorn running on http://127.0.0.1:3001/ (Press CTRL+C to quit)
INFO: Started reloader process [1736] using WatchFiles
INFO: Started server process [18116]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: 127.0.0.1:49487 - "GET / HTTP/1.1" 200 OK
0
0
INFO: 127.0.0.1:49488 - "GET /vidsrc/297802 HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application

Lets make this Scraper work again

I am just writting this to as a form to contact you. I want to make some cool stuff like this one you did . make a app or website or anything where user can get ad free experince. more than anything i wanna get better at code. just hit me up cause i want people who like to code to work togehter and imporve our craft . [email protected]

Error code 500

It was deployed successfully on vercel but it returns error code 500 no matter wthat i search. There was no typos ao anything wrong wirh perameters but it was giving error code 500.

Subtitles

Fetching subtitles is not working, anyway thank you so much much for this respo

Vidsrc.to returning only Auto quality for movies

Hey cool-guy, im using your vidsrc.to api for my website and i realized today that is returning only Auto quality until yestarday it was returning all qualities, Auto, 1080p, 720p, 360. I checked on vidsrc.to site to see if they still with all thoso qualities, and it is. By the way, only movies have this problem with only Auto quality, TV Shows still with multiple quality

how?

how to use this shit?

Non Python Dev

Hello, great work. I don't work with Python nor Node nor Vercel and I've had a hard time tryin to make this even work on Vercel as I've just created an account. Could someone list the detailed steps to make this work in Vercel as this is the lovely message I keep getting:

WARN! Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
Error: Unable to find any supported Python versions.
Learn More: http://vercel.link/python-version

I don't even know where you people are getting the Node version settings from because I don't see anything in Vercel of the sort. I'd appreciate help on a detailed step for this. Thank you

Vidplay source blank

bro, I'm getting blank data on Vidplay source. can you fix it, please? also Filemoon source got 404.

{ "status": 200, "info": "success", "sources": [ { "name": "Vidplay", "data": {} }, { "name": "Filemoon", "data": { "stream": "https://be6224.rcr92.lim01.cdn112.com/hls2/01/01947/cem677z8yclh_x/master.m3u8?t=Y1N51ETQv8_daJmuiFk7ASbImHEspZ2BRQIySTtjBMk&s=1716027596&e=43200&f=19003911&srv=14&asn=14618&sp=5500", "subtitle": [ { "lang": "Arabic", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018524.vtt" }, { "lang": "Bengali", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018536.vtt" }, { "lang": "Brazillian Portuguese", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018558.vtt" }, { "lang": "Bulgarian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018578.vtt" }, { "lang": "Chinese (BG code)", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018603.vtt" }, { "lang": "Croatian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018616.vtt" }, { "lang": "Czech", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019446.vtt" }, { "lang": "Danish", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018675.vtt" }, { "lang": "Dutch", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018690.vtt" }, { "lang": "English", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018438.vtt" }, { "lang": "Farsi/Persian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018718.vtt" }, { "lang": "Finnish", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018725.vtt" }, { "lang": "French", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018736.vtt" }, { "lang": "German", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018800.vtt" }, { "lang": "Greek", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018828.vtt" }, { "lang": "Indonesian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14018958.vtt" }, { "lang": "Korean", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019037.vtt" }, { "lang": "Malay", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019096.vtt" }, { "lang": "Malayalam", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019132.vtt" }, { "lang": "Norwegian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019146.vtt" }, { "lang": "Polish", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019158.vtt" }, { "lang": "Portuguese (Brazilian)", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019434.vtt" }, { "lang": "Portuguese", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019173.vtt" }, { "lang": "Romanian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019234.vtt" }, { "lang": "Russian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019242.vtt" }, { "lang": "Serbian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019256.vtt" }, { "lang": "Sinhala", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019266.vtt" }, { "lang": "Slovenian", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019293.vtt" }, { "lang": "Spanish", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019343.vtt" }, { "lang": "Sundanese", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019352.vtt" }, { "lang": "Swedish", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019360.vtt" }, { "lang": "Thai", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019370.vtt" }, { "lang": "Urdu", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019423.vtt" }, { "lang": "Vietnamese", "file": "https://rapidcdn.cc/sub/cache/subtitle/14019428.vtt" } ] } } ] }

Deployed on vercel but no sources are coming up

Thanks for your work. I was able to deploy on vercel using the button from your main page and it was successfuly built and deployed.
Unfortunately when I try to get sources via API call, it doesn't return anything.
Any suggestions?

image

image

Vidplay

Hello could you please fix Vidplay it's null thanks

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.