Giter Site home page Giter Site logo

tokitouq / manga-api Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 4.0 3.03 MB

A Python based web scraping api built with fastapi that provides easy access to manga contents

Home Page: https://mangareader-api.vercel.app

License: MIT License

Python 87.68% Makefile 2.89% Shell 5.41% HTML 4.02%
fastapi manga mangareader python python-web-scraper scraping web-scraping manga-api anime

manga-api's Issues

feat: new endpoint `/genre/`

New endpoint to get list of Manga with genre passed as parameter. eg: /genre/action, returns list.
Utilize BaseSearchScraper for this since HTML structure is same.

also add other queries like page offset limit and sort

[`Feature`] : Revert to single provider

Our current workflow is like, now we've 2 providers for getting manga contents.
Due to this, we could only provide limited informations for each endpoints ( need to provide synced info ).
So I think its better if we can provide more information.
For this goal, we need to rely on single provider.

AniList seems promising and has server side rendering.
means we can use selectolax to get info ( faster ).

[`Backend`]: refactor codebase for supporting more providers

Unfortunately mangareader seems down ( showing its for sale ).
Currently manga-api only relies on mangareader for data, but since it went down we gotta change provider.

Well I think its better if we can change whole codebase for supporting different providers, we need to scale ( currently this architecture isnt scalable ).
We will prolly change folder structure as well like
url can be like: /api/<provider>/<query>/

List of manga providers we can use: https://github.com/anshumanv/awesome-anime-sources#manga
Note: we might need to use selenium instead, well but its better if we can do this with selectolax itself.

feat: migrate to `Django` and `drf`

Currently this project uses FastAPI, but now I'm thinking to rewrite this in django and django-rest-framework.
since I use this kinda scraping logics for mangacore ( a project for streaming mangas ), it would be better to try this in django and drf.

I'd like hear your opinions.

[`Ideas`] : change API architecture

Hi there, hope you like this API.

What do you think about making this a single provider? I mean, scrape datas from just 1 site?
currently you can get same data from 2 different providers.

I think if we move to single provider, we can provider more info such as "latest, trending, sorting, etc..." like extra queries.
duplicate(#175) nvm.

Please share your thoughts bout this.
have a nice day.... ❤️

refactor: use `self.parser` instead `utilities.get-*`

https://github.com/tokitou-san/MangaAPI/blob/e09ad4d36c7001a95c9ece318cb5d3c23bc6fa97/app/api/utils.py#L1-L15

Use self.parser.* instead functions from utilities.
eg: instead this code
https://github.com/tokitou-san/MangaAPI/blob/cccbcb6437861ebaf8aea7ef3d52bd00881cc3be/app/api/scrapers/popular.py#L16

Do something like ( might different for other cases )

slug = self.parser.css("div#manga-trending div.swiper-slide a.link-mask").attributes["href"] 

Lmk if you want more info or anything :)

feat: add `markdown`

Add markdown for index page, currently its rendering in markdown format, we need in html
use markdown and pass to template
then render with |safe filter

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.