This API scrapes anime torrent magnets from AnimeTosho.
- Clone the repo to a directory with:
git clone [email protected]:NebulaZer0/AniScraper.git
- move to the
cmd
directory
cd cmd
- Create Executable:
go build -o aniscraper
- Start Service:
./aniscraper
- Clone the repo to a directory with:
git clone [email protected]:NebulaZer0/AniScraper.git
- Build the docker image:
docker compose build
- Create container:
docker compose up
To remove type: docker compose down
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 | * |
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 |
Gets a torrent object based on the title
curl -i -X GET localhost:8080/search?title=animeName \
-H "Content-Type: application/json"
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"
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"
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"
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:?..."
}
]
}