Skip to content

API that scrapes anime torrent magnets from AnimeTosho.

License

Notifications You must be signed in to change notification settings

NebulaZer0/AniScraper

Repository files navigation

AniScraper

This API scrapes anime torrent magnets from AnimeTosho.


Quick Start

  1. Clone the repo to a directory with:
git clone [email protected]:NebulaZer0/AniScraper.git
  1. move to the cmd directory
cd cmd
  1. Create Executable:
go build -o aniscraper
  1. Start Service:
./aniscraper

Docker Setup

  1. Clone the repo to a directory with:
git clone [email protected]:NebulaZer0/AniScraper.git
  1. Build the docker image:
docker compose build
  1. Create container:
docker compose up

To remove type: docker compose down


Enviroment Variables

Option Description Default
SERVER_PORT Sets the port to listen on 8080
MAX_PAGE Sets how many pages to scrape through 15
ACAO Set Access-Control-Allow-Origin header address *

API

GET /search


Items

Field Data Type Description Required Max
title string Title of anime to search Yes 1
filter []string Returns titles that contains filter strings No 10
minSeed int Returns titles that are greater then minSeed value No None
maxEntry int Returns a specfic amount of titles No 100

Examples

Title Field

Gets a torrent object based on the title

curl -i -X GET localhost:8080/search?title=animeName \
-H "Content-Type: application/json"

Filter Field

Shows releated torrent names based on filter strings.

curl -i -X GET http://localhost:8080/search?title=animeName&filter=value&filter=value2 \
-H "Content-Type: application/json"

Minimum Seed Field

Get seeds that are greater then the minimum seed value.

curl -i -X GET http://localhost:8080/search?title=konosuba&minSeed=10 \
-H "Content-Type: application/json"

Max Entry Field

Gets a specific amount of entrys based on max entry value.

curl -i -X GET http://localhost:8080/search?title=KonoSuba&maxEntry=5 \
-H "Content-Type: application/json"

Response

HTTP/1.1 200 OK
Content-Type: application/json
Date: Sat, 22 Oct 2022 20:33:23 GMT
Content-Length: 694

{
        "Results": [
                {
                        "name": "[EMBER] Belle ...",
                        "size": "4.036 GB",
                        "seed": "53",
                        "magnet": "magnet:?..."
                }
        ]
}

Libraries Used

About

API that scrapes anime torrent magnets from AnimeTosho.

Resources

License

Stars

Watchers

Forks

Packages

No packages published