GithubHelp home page GithubHelp logo

aniapi-team / aniapi Goto Github PK

View Code? Open in Web Editor NEW
173.0 173.0 24.0 785 KB

Core behind AniAPI HTTP Rest APIs.

Home Page: https://aniapi.com

License: GNU General Public License v3.0

C# 91.30% HTML 1.67% Python 7.03%
anilist anime anime-api aniplaylist api api-rest myanimelist

aniapi's People

Contributors

alexrintt avatar dazornsama avatar kapilarny avatar mrtruth0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aniapi's Issues

Endpoint for global recent episodes.

We are a team of developers working on an app called Enime, an anime streaming and managing app, and we would like to move backend APIs to AniAPI. The only problem we face is that there's no global recent episodes endpoint, which is usually a feature of a lot of other anime streaming apps and an important feature to have in general. If you could provide us with this feature, we would be able to easily move over and spread the influence of this API while also putting it to good use.

prequel and sequel are in a loop

Anime - Saiyuki

2.1 Gensomaden Saiyuki (2000โ€“01)
2.2 Saiyuki Reload (2003โ€“04)
2.3 Saiyuki Reload GunLock (2004)
2.4 Saiyuki Reload Blast (2017)
2.5 Saiyuki Reload: Zeroin (2022)

This is the following sequence for anime.

The issue is in the sequence of the last two anime are in a loop anime_id: 3749 & anime_id: 2930

[BUG] Can't access website, raising a "Connection Time-out behaviour."

I can't seem to access the website. Is it down currently? I tried connecting to it using requests in Python, and it raises the same error.

Full screenshot when going to the website

FULL TRACEBACK:

  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
    raise err
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
    sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connection.py", line 179, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x0000025B93B5F910>, 'Connection to aniapi.com timed out. (connect timeout=None)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='aniapi.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000025B93B5F910>, 'Connection to aniapi.com timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "x:\pyracy\test.py", line 5, in <module>
    r = requests.get(url)
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\berio\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 553, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='aniapi.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000025B93B5F910>, 'Connection to aniapi.com timed out. (connect timeout=None)'))```

Quota-Limit for requests

Add a quota-limit based system to prevent users from making too much requests to the WebAPI.
A suggestion could be like maximum 90 requests each minute, no matter what endpoint is used.
In order to track a sequence of requests, could be possible to track down IPs and store them on a pool.

[FIX] JWT Validation - Email not Verified

// I am using nextjs here, I am getting this response, assuming that I have the correct JWT token
/*
{
data: "Email not verified"
message: "Unauthorized"
status_code: 401
version: "1"
}
*/

import { useEffect } from 'react';

const baseUrl = 'https://api.aniapi.com';

export default function Home({ ANIAPI_JWT }) {

const reqOptions = {
headers: {
'Authorization': 'Bearer ' + ANIAPI_JWT
}
};

useEffect(() => {
logAnime();
}, []);

async function logAnime() {
const res = await fetch(baseUrl + '/v1/auth/me', reqOptions);
const data = await res.json();
console.log(data);
}

return (


Anime

);
}

export async function getStaticProps() {
return {
props: {
ANIAPI_JWT: process.env.ANIAPI_JWT
}
};
}

[FEATURE] Actual Episode title

Currently, when getting an Episode, the title defaults to Episode X instead of the actual episode title. If this is intended behaviour, please make this a feature request to include the actual episode title

Unable to stream m3u8 streaming video URLs

Hi everyone I am making a desktop application for streaming Anime but unfortunately I am not able to stream this m3u8 video URL.

            {
                "anime_id": 1,
                "number": 1,
                "title": "Episode 1",
                "video": "https://yqwdm.vizcloud.xyz/simple/EqPFI_8QBAro1HhYl67rC8Eur1xdu_ewAwN7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/XEYLM4M4WPVN?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 1
            },

This is what my current application looks like : -


Need help with how I can play these video URLs, event if I paste the URL's in Browser it's not playing.

Search for english dubs on gogoanime

Right now gogo anime is being used for english subs, but it also has english dubs for a ton of anime as well. Being able to access those as well would be a really nice addition.

rendering video link of anime

Example of response

GET Request - Please scroll down for query

https://api.aniapi.com/v1/episode?anime_id=3377&is_dub=false

{
    "status_code": 200,
    "message": "Page 1 contains 12 episodes. Last page number is 1 for a total of 12 episodes",
    "data": {
        "current_page": 1,
        "count": 12,
        "documents": [
            {
                "anime_id": 3377,
                "number": 1,
                "title": "Episode 1",
                "video": "https://vjbnb.vizcloud2.online/simple/EqPFIPoQBAro1HhYl67rC5ouq1wAvrjyFBl7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/7ZPNMMZ29Y02?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45856
            },
            {
                "anime_id": 3377,
                "number": 2,
                "title": "Episode 2",
                "video": "https://ekerp.vizcloud2.online/simple/EqPFI_gQBAro1HhYl67rC5su+1wGub+6SUx7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/8EJWOO941Y04?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45857
            },
            {
                "anime_id": 3377,
                "number": 3,
                "title": "Episode 3",
                "video": "https://qjyoj.vizcloud2.online/simple/EqPFI_kQBAro1HhYl67rC5YurlxVu730AAV7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/G6JOMM6OQY9O?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45858
            },
            {
                "anime_id": 3377,
                "number": 4,
                "title": "Episode 4",
                "video": "https://vjbxb.vizcloud2.online/simple/EqPFI_IQBAro1HhYl67rC5IuoFwb4+W0Qhh7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/GQP455348J93?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45859
            },
            {
                "anime_id": 3377,
                "number": 5,
                "title": "Episode 5",
                "video": "https://lezmo.vizcloud2.online/simple/EqPFI_IQBAro1HhYl67rC8Yuq1xcu73oAgZ7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/E6JR55874Y3X?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45860
            },
            {
                "anime_id": 3377,
                "number": 6,
                "title": "Episode 6",
                "video": "https://rnrjz.vizcloud2.online/simple/EqPFIPsQBAro1HhYl67rC5Mu_Vxbu73xAA17rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/26J388MX3PRD?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45861
            },
            {
                "anime_id": 3377,
                "number": 7,
                "title": "Episode 7",
                "video": "https://nnqkm.vizcloud2.online/simple/EqPFI_gQBAro1HhYl67rC8cu+lxcu73oFQZ7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/E6JR558V4Y3X?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45862
            },
            {
                "anime_id": 3377,
                "number": 8,
                "title": "Episode 8",
                "video": "https://bpjkq.vizcloud2.online/simple/EqPFI_8QBAro1HhYl67rC5cuqVwHub_zQkJ7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/83P7OONX8PLE?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45863
            },
            {
                "anime_id": 3377,
                "number": 9,
                "title": "Episode 9",
                "video": "https://nnqbm.vizcloud2.online/simple/EqPFIPsQBAro1HhYl67rC5EuqVxdu73vDAV7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/XEYLMMDNKPVN?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45864
            },
            {
                "anime_id": 3377,
                "number": 10,
                "title": "Episode 10",
                "video": "https://zpzrm.vizcloud2.online/simple/EqPFI_IQBAro1HhYl67rC8Aurlxau73yAA57rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/9VJ188MXXYQ5?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45865
            },
            {
                "anime_id": 3377,
                "number": 11,
                "title": "Episode 11",
                "video": "https://mmxpl.vizcloud2.online/simple/EqPFI_8QBAro1HhYl67rC5Yur1xdu73vQwV7rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/XEYLMMD9KPVN?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45866
            },
            {
                "anime_id": 3377,
                "number": 12,
                "title": "Episode 12",
                "video": "https://vjbxb.vizcloud2.online/simple/EqPFI_0QBAro1HhYl67rC5Qur1xbu73xEQ17rqk+wYMnU94US2El/br/list.m3u8",
                "video_headers": {
                    "referer": "https://vidstream.pro/info/26J388M23PRD?domain=gogoanime.lol&skey=dcb0a59359d3f732f8b545fd2908e497"
                },
                "format": "m3u8",
                "locale": "en",
                "is_dub": false,
                "id": 45867
            }
        ],
        "last_page": 1
    },
    "version": "1"
}

I want to stream a video for example using link from response above
https://vjbnb.vizcloud2.online/simple/EqPFIPoQBAro1HhYl67rC5ouq1wAvrjyFBl7rqk+wYMnU94US2El/br/list.m3u8

I know I have to use a module in HTML to render that video above.

When i tried using a testing site for m3u8
https://livepush.io/hls-player/index.html

Note no render output/ file is dead!

Please investigate with my query.

I would love to build a cool anime streaming web app with no Porn/AD's for the community.

[BUG] aniapi.com cant create account

Describe the bug
Your registration form has a cors issue with browsers when I want to register. Cant pass from form.

To Reproduce
Steps to reproduce the behavior:

  1. Go to (https://aniapi.com/signup)
  2. Fill form info.
  3. Click on "signup"
  4. Cant pass from there. In console has a cors error

Expected behavior
To register for API usage.

Additional context
Tested on Firefox and Chrome.
OS: Linux Mint 20

Mapping all episodes

Mapping all episodes to their respective anime.
Especially for GoGoAnime.

Eg OnePiece for Gogo anime is only showing 14 episodes in total.

What video format is being streamed

Could u pls specify which video format is coming in the API like when is the video streaming m3u8 and when is it in m4

  • This might be helpful for faster video playback.

[Bug] Some Anilist's anime are not collected

Nekopara is an anime listed on both MyAnimeList and Anilist yet trying
https://api.aniapi.com/v1/anime?anilist_id=106863
or
https://api.aniapi.com/v1/anime?mal_id=38924
just doesn't say anything, but oddly enough the OVAs and the specials show when I try
https://api.aniapi.com/v1/anime?title=Nekopara
but yet the actual anime doesn't?

Seems to happen with a lot of anime.

[Feature Request] Expose raw_url

Add raw_url and headers fields to the episode contract.
This aaddition could be useful in case someone want to host his own reverse-proxy or just do some cool stuffs.

UPDATE 14/02/2022
With this fix, AniAPI's reverse-proxy will be removed.

Manage a session specific filter on anime list

As older version of AniAPI, wuold be nice to have a session-based filter on our anime search page. This will allow our users to not do the same thing each time they visit the anime list page.

Fetch with a list of IDs and simplify API.

The current /anime/:id endpoint is very restricting for us as there's only one ID we can provide. We would need information on many anime at once in a basic service, and requesting all of them separately would be very tedious for both the API and us. The other listed /anime/ endpoint can't provide list based ID params either.

A possible solution I thought of for this is to take off the /anime/:id endpoint and just add an id param to the existing /anime/ endpoint, while enabling list support for it and all other id based params. This would make the API simpler and would offer a greater deal of support.

This could also be done with all other endpoints.

[Feature Request] Slug Identifier and Filter Parameter

Good Evening, I recently came across your repository today. I've seen the websites and the endpoints as well. The website was very easy to understand and developer friendly. I'm looking forward for the development of you team's API.

Adding a slug identifier for the identifying anime request would be helpful to identify data. Something you should also add on is a filter parameter which filters depending on the property you want to filter such as genre, etc.

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.