consumet / api.consumet.org

A Modern Search Engine API for Anime, Movies/TVShows, Books, Light Novels, Manga, etc.
https://docs.consumet.org
GNU General Public License v3.0
1.17k stars 531 forks source link

Fmovies not working #428

Closed pitsi closed 2 months ago

pitsi commented 1 year ago

Describe the bug

As mentioned in the title, the fmovies provider does not work, neither at your instance, nor at the one I host locally

Steps to reproduce

Use the api's function to search something through fmovies. Using your instance that returns a 403 error

$ curl https://api.consumet.org/movies/fmovies/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"Request failed with status code 403"

Using my instance, hosted locally

# curl -s http://localhost:3000/movies/fmovies/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"connect ECONNREFUSED ::1:80"}

# curl -s http://localhost:3000/movies/fmovies/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"connect EAFNOSUPPORT ::1:80 - Local (undefined:undefined)"}

The top error is with ip6 disabled (kernel parameter ipv6.disable=1), the bottom one is with ipv6 enabled.

Expected behavior

I don't know how the results from fmovies actually look like, but I assume they should look like the ones from flixhq

# curl -s http://localhost:3000/movies/flixhq/deadpool
{"currentPage":1,"hasNextPage":false,"results":[{"id":"movie/watch-deadpool-19694","title":"Deadpool","url":"https://flixhq.to/movie/watch-deadpool-19694","image":"https://img.flixhq.to/xxrz/250x400/379/17/5c/175c58ef507c3b92a77825d04569a3ed/175c58ef507c3b92a77825d04569a3ed.jpg","releaseDate":"2016","type":"Movie"},{"id":"movie/watch-deadpool-2-19799","title":"Deadpool 2","url":"https://flixhq.to/movie/watch-deadpool-2-19799","image":"https://img.flixhq.to/xxrz/250x400/379/e5/6f/e56fac68a871cf787db740d4d3072603/e56fac68a871cf787db740d4d3072603.jpg","releaseDate":"2018","type":"Movie"},{"id":"movie/watch-once-upon-a-deadpool-19800","title":"Once Upon a Deadpool","url":"https://flixhq.to/movie/watch-once-upon-a-deadpool-19800","image":"https://img.flixhq.to/xxrz/250x400/379/5b/92/5b924878c80e51ff2db738eb2d55e691/5b924878c80e51ff2db738eb2d55e691.jpg","releaseDate":"2018","type":"Movie"}]}

Actual behavior

See above. The reason I tried with ipv6 support disabled is explained below.

Additional context

Flixhq returns this error and fails with anything when ipv6 is enabled. That is why I tried both providers with it being disabled.

# curl -s http://localhost:3000/movies/flixhq/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"connect EHOSTUNREACH (ipv6 address removed)"}
pitsi commented 1 year ago

Semi-offtopic. Because arch is on npm 8.x, I also gave alpine a try that is on npm 9.x. Both fmovies and flixhq fail with ipv6 enabled. Fmovies shows the same as above, while flixhq shows this timeout error

# curl -s http://localhost:3000/movies/flixhq/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"Socket connection timeout"}

If anyone else does notice this with ipv6 enabled, please share your experience.

pitsi commented 1 year ago

Was fmovies fixed or changed since then? I just noticed that there were new commits in the repo after ~2 months of silence, so I gave it a try and it now returns this error about a maximum number of retries. It also take like 30+ seconds to reply.

$ curl -s https://api.consumet.org/movies/fmovies/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"Reached the max retries per request limit (which is 20). Refer to \"maxRetriesPerRequest\" option for details."}

Sadly, I no longer have the local instance so as to test, I deleted it in late May.

forsyth47 commented 1 year ago

Here is the self-hosted url, if you guys wanna try something https://conmet.vercel.app

I have encountered similar issue with flixhq endpoint, and I opened a issue at consumet.ts repo, since the REST API is just a wrapper for it. issue

pitsi commented 1 year ago

Thank you for letting me try your instance. However, it returns the same error as the one I describe at the start

$ curl -s https://conmet.vercel.app/movies/fmovies/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"connect EAFNOSUPPORT ::1:80 - Local (undefined:undefined)"}

If I am doing something wrong, please tell me.

pitsi commented 1 year ago

Something was fixed with the last commit, the one from 2 days ago, and the api now returns something more meaningful.

$ curl https://api.consumet.org/movies/fmovies/deadpool
{"currentPage":1,"hasNextPage":false,"results":[]}

Let's hope it will really return results one day :)

pitsi commented 1 year ago

And today's commit increased the response time from just milliseconds to ~30 seconds or more, even 1+ minute! The fastest I have seen is ~25 seconds and the slowest is this ~1.5 minute delay!

$ curl -w %{time_total} https://api.consumet.org/movies/fmovies/deadpool
{"currentPage":1,"hasNextPage":false,"results":[]}
86.906209

---edit And we are back to milliseconds! Thanks to anyone who fixed it.

$ curl -w %{time_total} https://api.consumet.org/movies/fmovies/deadpool
{"currentPage":1,"hasNextPage":false,"results":[]}
0.281467

---re-edit, 12 hours later I jinxed it and it broke again! It reached 100 seconds on a previous run.

$ curl -w %{time_total} https://api.consumet.org/movies/fmovies/deadpool
{"currentPage":1,"hasNextPage":false,"results":[]}
72.802216
pitsi commented 1 year ago

New week, new error :p

$ curl https://api.consumet.org/movies/fmovies/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"write EPROTO C087EAD08C7F0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1586:SSL alert number 80\n"

On top of that, tmdb is now broken as well, with a 401 error for search and info. The watch function still works though.

$ curl https://api.consumet.org/meta/tmdb/deadpool
{"statusCode":500,"error":"Internal Server Error","message":"Request failed with status code 401"}
$ curl https://api.consumet.org/meta/tmdb/info/293660?type=movie
{"statusCode":500,"error":"Internal Server Error","message":"Request failed with status code 401"}
pitsi commented 1 year ago

And the watch function for tmdb is now broken too :(

$ curl https://api.consumet.org/meta/tmdb/watch/19694?id=movie/watch-deadpool-19694
{"message":{}
pitsi commented 11 months ago

@forsyth47 Sorry for the 4-month late question. Do you still update your self-hosted instance? I still can not host my own, so I can not check if anything has changed after all those commits, but fmovies still gives the same error as before at your instance.

pitsi commented 8 months ago

Today, 1 year after opening the issue, I had the chance of making a new vm to test if anything has changed. And sadly nothing has changed, fmovies remains broken, and it even has the same errors like last year :(

Libgen is also broken.

crxssed7 commented 7 months ago

Not sure if this would fix the original issue but Fmovies changed their domain at some point from fmovies.to to fmoviesz.to

I've never setup consumet locally myself but I wonder if changing this line would fix some problems (in the consumet.ts repo): https://github.com/consumet/consumet.ts/blob/6362574c2cfff6f0f906030391891ec19ba06285/src/providers/movies/fmovies.ts#L21

pitsi commented 2 months ago

With fmovies dead and buried for almost a month now, there is no reason to keep this open. After all, it never worked.