Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Showing AnimeDex Most Viewed Anime On HomePage
Browse files Browse the repository at this point in the history
Now The Actual Popular Animes of AnimeDex will show on HomePage instead of fetching from Anilist
  • Loading branch information
TechShreyash committed Feb 11, 2023
1 parent bcaa56c commit d8e9aa0
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions programs/html_gen.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import requests
import random
from programs.gogo import Anime, GoGoApi
from programs.others import get_atitle, get_genre, get_t_from_u, get_urls
Expand Down Expand Up @@ -78,25 +79,21 @@ def animeRecHtml(data):


def get_trending_html():
data = Anilist().popular()
data: dict = requests.get(
'https://api.animedex.live/top').json().get('top')
html = ''

for i in data:
img = i.get('coverImage')
if img:
img = img.get('medium').replace('small', 'medium')
else:
img = i.get('bannerImage')
title = get_atitle(i.get('title'))
url = get_urls(title)
for id, i in data:
img = i[5]
title = i[0]
url = get_urls(id)
x = ANIME_POS.format(
url,
get_genre(i.get('genres')),
'Ep '+str(i.get('episodes')).strip(),
i[1],
'Ep '+str(i[2]),
img,
title,
i.get('type'),
i.get('status')
i[3],
i[4]
)
html += x

Expand Down

1 comment on commit d8e9aa0

@vercel
Copy link

@vercel vercel bot commented on d8e9aa0 Feb 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anime-dex – ./

anime-dex1.vercel.app
anime-dex-git-main-techshreyash.vercel.app
anime-dex-techshreyash.vercel.app

Please sign in to comment.