sherlock icon indicating copy to clipboard operation
sherlock copied to clipboard

Support for Mangadex

Open mastermach50 opened this issue 3 years ago • 3 comments

Checklist

  • [ x ] I'm requesting support for a new site
  • [ x ] I've checked for similar site support requests including closed ones
  • [ x ] I've checked that the site I am requesting has not been removed in the past and is not documented in removed_sites.md
  • [ x ] The site I am requesting support for is not a pornographic website
  • [ x ] I'm only requesting support of one website (create a separate issue for each site)

Description

I am requesting support for Mangadex. They do have a well documented REST API at https://api.mangadex.org. Please refer to this section for searching users, https://api.mangadex.org/docs.html#tag/User

URL: https://mangadex.org

mastermach50 avatar Mar 12 '22 07:03 mastermach50

From my testing, it looks like the /user/{id} is a randomly generated uuid. Attempted some testing below:

curl https://api.mangadex.org/user/fappyfap
{"result":"error","errors":[{"id":"524eb5f9-8408-5783-b4fc-5b176572e923","status":404,"title":"not_found_http_exception","detail":"No route found for \"GET https:\/\/api.mangadex.org\/user\/fappyfap\"","context":null}]}%                             

curl https://api.mangadex.org/user/61c439b0-8792-4c48-8035-fe6c39f52e79
{"result":"ok","response":"entity","data":{"id":"61c439b0-8792-4c48-8035-fe6c39f52e79","type":"user","attributes":{"username":"fappyfap","roles":["ROLE_UNVERIFIED"],"version":1},"relationships":[]}}%

I will let someone else 100% confirm, but it doesn't look like this site will be possible to add

ghost avatar Apr 02 '22 04:04 ghost

https://api.mangadex.org/user/{id} is for getting a user using their id.

The right approach would be to search for the user using user list (see https://api.mangadex.org/docs.html#operation/get-user) and then search using the first id given in the response as https://api.mangadex.org/user/{id}

This requires authentication using a JWT token, which I am not familiar with. This might make things more complicated.

mastermach50 avatar Apr 04 '22 15:04 mastermach50

Maybe you can try using MangaDex.py's search() function to get the user's username and user id or a simple Selenium script can do the trick.

vkay11 avatar Oct 05 '22 04:10 vkay11

Since the ID is created randomly this will be difficult to implement. I might add it to Sherlock in the future once the rewrite is complete :)

sdushantha avatar Feb 16 '23 19:02 sdushantha