KartoffelChipss/aniworld.ts ? reverse-engineered prompt

Reverse engineered prompt

Build me a small TypeScript library for scraping anime and series data from Aniworld and similar sites like s.to.

I want to be able to create a client with a custom base URL, choose whether it is for anime or series, and optionally set a user agent, debug logging, and caching. Then I should be able to search for titles, fetch a show or anime page by slug, get its details like title and description, and load the episodes for a specific season. It should also support movies through a separate method or by using season zero.

Please make the API simple and pleasant to use from a Node project, with clear typed responses and examples in the README. If the site structure is a little different between supported services, handle that behind the scenes so the same client still works. Add sensible defaults, good error handling, and keep it easy to extend later if I want to support more similar sites.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab