api.consumet.org icon indicating copy to clipboard operation
api.consumet.org copied to clipboard

Zoro streaming

Open animeduniya opened this issue 6 months ago • 16 comments

Zoro provider or meta/anilist are not returning streaming urls

animeduniya avatar Jun 10 '25 08:06 animeduniya

Here is the fix for that issue:

https://github.com/carlosesteven/consumet.ts/blob/master/src/extractors/megacloud/megacloud.getsrcs.ts#L776

got response with subtitles only. no m3u8 sources

dpunkz09 avatar Jun 13 '25 13:06 dpunkz09

Output Data

{
  "headers": {
    "Referer": "https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1"
  },
  "subtitles": [],
  "intro": {
    "start": 0,
    "end": 0
  },
  "outro": {
    "start": 0,
    "end": 0
  },
  "sources": []
}

Error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5738:19)
    at successSteps (node:internal/deps/undici/undici:5719:27)
    at fullyReadBody (node:internal/deps/undici/undici:4609:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async consumeBody (node:internal/deps/undici/undici:5728:7)
    at async getSources (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/megacloud.getsrcs.js:705:25)
    at async MegaCloud.extract (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/index.js:25:26)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:153:33)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:226:24)

how?

HarukaRepo avatar Jun 23 '25 08:06 HarukaRepo

zoro and other now provide a full html page on response

how it used to be: it used to be a seperate call that returned json with the page data

how it is now: now its the full html page returned with the data already filled in

this would need to be a scraping addition / regex matching

Fluffik3666 avatar Jul 13 '25 21:07 Fluffik3666

Output Data

{ "headers": { "Referer": "https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1" }, "subtitles": [], "intro": { "start": 0, "end": 0 }, "outro": { "start": 0, "end": 0 }, "sources": [] }

Error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5738:19)
    at successSteps (node:internal/deps/undici/undici:5719:27)
    at fullyReadBody (node:internal/deps/undici/undici:4609:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async consumeBody (node:internal/deps/undici/undici:5728:7)
    at async getSources (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/megacloud.getsrcs.js:705:25)
    at async MegaCloud.extract (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/index.js:25:26)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:153:33)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:226:24)

how?

You can use my api - https://yumaapisources.vercel.app/sources?url=https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1 if u want an easier way then here - https://yumaapi.vercel.app

Gamma7113131 avatar Jul 15 '25 12:07 Gamma7113131

Output Data

{ "headers": { "Referer": "https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1" }, "subtitles": [], "intro": { "start": 0, "end": 0 }, "outro": { "start": 0, "end": 0 }, "sources": [] }

Error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5738:19)
    at successSteps (node:internal/deps/undici/undici:5719:27)
    at fullyReadBody (node:internal/deps/undici/undici:4609:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async consumeBody (node:internal/deps/undici/undici:5728:7)
    at async getSources (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/megacloud.getsrcs.js:705:25)
    at async MegaCloud.extract (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/index.js:25:26)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:153:33)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:226:24)

how?

You can use my api - https://yumaapisources.vercel.app/sources?url=https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1 if u want an easier way then here - https://yumaapi.vercel.app

okay thanks broo

RishabNandal avatar Jul 15 '25 12:07 RishabNandal

Output Data

{ "headers": { "Referer": "https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1" }, "subtitles": [], "intro": { "start": 0, "end": 0 }, "outro": { "start": 0, "end": 0 }, "sources": [] }

Error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5738:19)
    at successSteps (node:internal/deps/undici/undici:5719:27)
    at fullyReadBody (node:internal/deps/undici/undici:4609:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async consumeBody (node:internal/deps/undici/undici:5728:7)
    at async getSources (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/megacloud.getsrcs.js:705:25)
    at async MegaCloud.extract (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/index.js:25:26)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:153:33)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:226:24)

how?

You can use my api - https://yumaapisources.vercel.app/sources?url=https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1 if u want an easier way then here - https://yumaapi.vercel.app

keep it up bro thanks a lot

RishabNandal avatar Jul 15 '25 13:07 RishabNandal

@Gamma7113131

Would there be any way to modify the m3u8 response to embed subtitles into the response? A proxy of sorts. Thanks

Fluffik3666 avatar Jul 16 '25 16:07 Fluffik3666

Hi everyone,

I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork.

Here are the steps I followed to test the fix:

1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources.

Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}.

Hope this information helps move the issue forward.

SimonBlancoE avatar Jul 19 '25 10:07 SimonBlancoE

Hi everyone,

I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork.

Here are the steps I followed to test the fix:

1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources.

Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}.

Hope this information helps move the issue forward.

hello could you please provide your repo? working one pls?

RishabNandal avatar Jul 19 '25 10:07 RishabNandal

Hi everyone,

I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork.

Here are the steps I followed to test the fix:

1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources.

Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}.

Hope this information helps move the issue forward.

Currently, the endpoint /meta/anilist/watch/{valid-episode-id} is not working because the keys used to retrieve the episode sources from Zoro (the default provider) have changed. I previously had an automated process to obtain these keys, but the system changed two days ago. I haven’t yet been able to find a way to obtain the new key and decrypt the episode video file.

carlosesteven avatar Jul 19 '25 14:07 carlosesteven

Hi everyone,

I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork.

Here are the steps I followed to test the fix:

1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources.

Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}.

Hope this information helps move the issue forward.

@SimonBlancoE For now, if you were retrieving videos from Zoro/HiAnime, you can use this instead: https://megaplay.buzz/api

I implemented this solution: f16111265db7179a952c18a6703d6a85 and I believe it could be adapted to JS as well by following the same logic, ultimately allowing you to obtain something like this.

Image

That PHP endpoint will work if you call it like this — it's a GET request.

Just pass the following parameters:

get_videos.php?id=frieren-beyond-journeys-end-18542&ep=107257&server=hd-1&type=sub

carlosesteven avatar Jul 19 '25 14:07 carlosesteven

Hi everyone, I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork. Here are the steps I followed to test the fix: 1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources. Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}. Hope this information helps move the issue forward.

@SimonBlancoE For now, if you were retrieving videos from Zoro/HiAnime, you can use this instead: https://megaplay.buzz/api

I implemented this solution: f16111265db7179a952c18a6703d6a85 and I believe it could be adapted to JS as well by following the same logic, ultimately allowing you to obtain something like this.

Image That PHP endpoint will work if you call it like this — it's a GET request.

Just pass the following parameters:

get_videos.php?id=frieren-beyond-journeys-end-18542&ep=107257&server=hd-1&type=sub

check this "https://github.com/itzzzme/anime-api"

RishabNandal avatar Jul 19 '25 15:07 RishabNandal

Hi everyone, I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork. Here are the steps I followed to test the fix: 1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources. Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}. Hope this information helps move the issue forward.

@SimonBlancoE For now, if you were retrieving videos from Zoro/HiAnime, you can use this instead: https://megaplay.buzz/api

I implemented this solution: f16111265db7179a952c18a6703d6a85 and I believe it could be adapted to JS as well by following the same logic, ultimately allowing you to obtain something like this.

Image That PHP endpoint will work if you call it like this — it's a GET request.

Just pass the following parameters:

get_videos.php?id=frieren-beyond-journeys-end-18542&ep=107257&server=hd-1&type=sub

fr but u are doing great work

RishabNandal avatar Jul 19 '25 15:07 RishabNandal

Hi everyone, I wanted to share my findings after trying to use the forked repository to solve this issue. First, thanks to @carlosesteven for providing the fork. Here are the steps I followed to test the fix: 1. Setup

  • Started with a fresh clone of the official api.consumet.org repository (main branch).
  • Uninstalled the official @consumet/extensions package with npm uninstall @consumet/extensions.
  • Installed the fixed fork with npm install carlosesteven/consumet.ts. I confirmed my package.json was updated correctly.
  • Started the server with npm start.

2. Testing (using a separate API client)

  • I made a GET request to http://localhost:3000/meta/anilist/episodes/{anime-id}. This worked perfectly and returned a list of episodes with valid IDs.
  • I then took a valid episodeId from that list.
  • Finally, I made a GET request to http://localhost:3000/meta/anilist/watch/{valid-episode-id}.

Expected Result: A 200 OK response with the streaming sources. Actual Result: The request still failed with a 500 Internal Server Error and the message {"message": "Something went wrong. Contact developer for help."}. Hope this information helps move the issue forward.

@SimonBlancoE For now, if you were retrieving videos from Zoro/HiAnime, you can use this instead: https://megaplay.buzz/api I implemented this solution: f16111265db7179a952c18a6703d6a85 and I believe it could be adapted to JS as well by following the same logic, ultimately allowing you to obtain something like this. Image That PHP endpoint will work if you call it like this — it's a GET request. Just pass the following parameters: get_videos.php?id=frieren-beyond-journeys-end-18542&ep=107257&server=hd-1&type=sub

check this "https://github.com/itzzzme/anime-api"

Yes, it's a good implementation. I tried it; in my case, I already had a PHP backend and didn't want to set up another service just to get the providers xd

carlosesteven avatar Jul 19 '25 15:07 carlosesteven

Output Data

{ "headers": { "Referer": "https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1" }, "subtitles": [], "intro": { "start": 0, "end": 0 }, "outro": { "start": 0, "end": 0 }, "sources": [] }

Error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5738:19)
    at successSteps (node:internal/deps/undici/undici:5719:27)
    at fullyReadBody (node:internal/deps/undici/undici:4609:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async consumeBody (node:internal/deps/undici/undici:5728:7)
    at async getSources (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/megacloud.getsrcs.js:705:25)
    at async MegaCloud.extract (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/index.js:25:26)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:153:33)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:226:24)

how?

You can use my api - https://yumaapisources.vercel.app/sources?url=https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1 if u want an easier way then here - https://yumaapi.vercel.app

Hey there, thank you so much for sharing the alternative! Really appreciate it . I was wondering—would it be possible to fork your source code repo so I can work on it as well?

itz-ankit avatar Sep 13 '25 18:09 itz-ankit

Output Data

{ "headers": { "Referer": "https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1" }, "subtitles": [], "intro": { "start": 0, "end": 0 }, "outro": { "start": 0, "end": 0 }, "sources": [] }

Error

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5738:19)
    at successSteps (node:internal/deps/undici/undici:5719:27)
    at fullyReadBody (node:internal/deps/undici/undici:4609:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async consumeBody (node:internal/deps/undici/undici:5728:7)
    at async getSources (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/megacloud.getsrcs.js:705:25)
    at async MegaCloud.extract (/var/task/node_modules/@consumet/extensions/dist/extractors/megacloud/index.js:25:26)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:153:33)
    at async Zoro.fetchEpisodeSources (/var/task/node_modules/@consumet/extensions/dist/providers/anime/zoro.js:226:24)

how?

You can use my api - https://yumaapisources.vercel.app/sources?url=https://megacloud.blog/embed-2/v2/e-1/x8dhIvE2uIIY?k=1 if u want an easier way then here - https://yumaapi.vercel.app

Hey there, thank you so much for sharing the alternative! Really appreciate it . I was wondering—would it be possible to fork your source code repo so I can work on it as well?

https://github.com/Gamma7113131/YumaAnimeAPI

Gamma7113131 avatar Sep 14 '25 18:09 Gamma7113131