banner_jpg
Username/Email: Password:
Forums

MangaUpdates API Comments/Suggestions/Bugs

Pages (9) [ First ... 2 3 4 5 6 7 8 Last ] Next
You must be registered to post!
From User
Message Body
Post #797376
Member

8:51 pm, May 22 2022
Posts: 2


I have a userscript for Mangadex that, if there's MangaDex has a MangaUpdates link for a series, scrapes the MangaUpdates series page to see if MangaUpdates knows of a more recent release than Mangadex. As it is now, the new API is not an improvement for this particular purpose.

Having to scrape the series page for the new ID prevents my userscript from benefiting from the API's laxer rate limit. Scraping the series page also gives me release times at hour granularity (ie "4 hours ago" vs only day granularity for api.mangaupdates.com/v1/releases/search. If that information is available from api.mangaupdates.com/v1/releases/{id}, it requires authentication, unlike scraping.

Last edited by blommpp at 8:51 pm, May 22 2022

Post #797385
Post #797395 - Reply to (#797385) by YuriM
user avatar


5:42 pm, May 23 2022
Posts: 2659


One can be accessed by others publicly, and the other one is for access by you only...

Post #797396 - Reply to (#797376) by blommpp
user avatar


5:45 pm, May 23 2022
Posts: 2659


I want to discourage scraping as it really reduces the performance of the site for others. I know some people will scrape the pages and get the new ids, but I don't want to make it easy because that's not the way I want people to use the API. I prefer people to use the search function.

Last edited by Manick at 5:45 pm, May 23 2022

Post #797397 - Reply to (#797396) by Manick
Member

8:17 pm, May 23 2022
Posts: 2


I tried putting the old id into https://api.mangaupdates.com/v1/releases/search and https://api.mangaupdates.com/v1/series/search without success

You want to discourage scraping and I want to avoid it, so what should I do instead of
Quote


The docs say "This API powers our website." What API functions enable fetching the series info for old urls like https://www.mangaupdates.com/series.html?id=53203? What API functions enable reporting releases as X hours ago instead of the day of the release?

Post #797401 - Reply to (#797397) by blommpp
user avatar


6:54 am, May 24 2022
Posts: 2659


All we want to prevent is enumeration of the database, because it's extremely heavy on our servers. That means we don't want folks to just run 200k GET requests, from 1-200k, all at once. If you scrape a page occasionally or on demand when you want to find the new ID, we realize that's going to happen and we're not going to prevent it. However, we would prefer you use our API's search function to find series going forward.

We have an API function that does what you're asking, but it's tagged as admin and hidden from the public schema. It is also controlled behind a service account role. We have several other functions that are available (that our site uses) that are hidden with this tag as well. These are mostly based around administrative functions like spam control and reporting, and aren't really of interest to users anyway.

Post #797410 - Reply to (#797294) by YuriM
user avatar
turn tables
Member

1:00 pm, May 24 2022
Posts: 3


Do you have an example API request using this? https://api.mangaupdates.com/v1/series/search
Or is there a method to do a simple search with just the name?

Last edited by elevate at 1:43 pm, May 24 2022

Post #797411 - Reply to (#797410) by elevate
Member

2:03 pm, May 24 2022
Posts: 56


Using python + requests lib:
Spoiler (mouse over to view)
import requests
r = requests.post('https://api.mangaupdates.com/v1/series/search', data={'search': 'naruto'})
print(r.json()['results'][ 0 ]['record']['series_id'])


Last edited by YuriM at 2:29 pm, May 24 2022

Post #797412 - Reply to (#797401) by Manick
Member

2:16 pm, May 24 2022
Posts: 56


Anyway people will find a way to scrape. Maybe you just release db dump monthly or so? Like anidb or wikipedia.

Post #797413 - Reply to (#797411) by YuriM
user avatar
turn tables
Member

2:53 pm, May 24 2022
Posts: 3


Sorry, i'm using java, do you have an example?

Post #797419 - Reply to (#797413) by elevate
user avatar


8:12 pm, May 24 2022
Posts: 2659


https://github.com/OpenAPITools/openapi-generator

OpenAPI Generator is a good tool for generating clients from API definitions for multiple languages.

You can point it at the API Definition here: https://api.mangaupdates.com/openapi.yaml

Last edited by Manick at 8:27 pm, May 24 2022

Member

10:37 am, May 25 2022
Posts: 2


I think I found an issue with https://api.mangaupdates.com/v1/releases/days

In the response, the "time_added" object is missing from "record".

user avatar
Member

8:25 am, May 26 2022
Posts: 1


How about a field for description without any HTML tags?

Post #797470 - Reply to (#797459) by romdierom
user avatar


6:05 pm, May 26 2022
Posts: 2659


Quote from romdierom
How about a field for description without any HTML tags?

You can use the unrenderedFields option, but other than that you can strip the tags easily... I've been wanting to move to markdown for editing, so at some point I will do a mass update.

Member

9:11 am, May 31 2022
Posts: 3


Can anyone confirm if per_page doesn't work in search or I'm getting something wrong?

Quote
requests.post('https://api.mangaupdates.com/v1/series/search', data={'search': 'naruto', 'per_page': 2})

Header of result:
Quote
{'total_hits': 822, 'page': 1, 'per_page': 25, 'results':


Thanks.

Pages (9) [ First ... 2 3 4 5 6 7 8 Last ] Next
You must be registered to post!