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

Commit

Permalink
AnimeDex v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TechShreyash committed Jul 22, 2023
1 parent e89b9dd commit a2ca122
Show file tree
Hide file tree
Showing 16 changed files with 197 additions and 57 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center"><a href="https://home.animedex.live"><img src="https://socialify.git.ci/TechShreyash/AnimeDex/image?description=1&font=Jost&forks=1&issues=1&logo=https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/static/img/favicon-5.png&name=1&owner=1&pattern=Floating%20Cogs&pulls=1&stargazers=1&theme=Dark"></a></h1>
<h2 align="center"><a href="https://home.animedex.live"><b>Watch Animes Online For Free</b></a></h4>
<h1 align="center"><a href="https://animedex.live"><img src="https://socialify.git.ci/TechShreyash/AnimeDex/image?description=1&font=Jost&forks=1&issues=1&logo=https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/static/img/favicon-5.png&name=1&owner=1&pattern=Floating%20Cogs&pulls=1&stargazers=1&theme=Dark"></a></h1>
<h2 align="center"><a href="https://animedex.live"><b>Watch Animes Online For Free</b></a></h4>

<hr>

Expand All @@ -13,8 +13,9 @@
- Fast And Responsive
- Uses Anilist To Get Data
- And GoGo Anime For Episodes
- Embed Support New 🔥 ([Read More](https://t.me/TechZBots/586))
- Can Be Deployed To Vercel.com And Repl.it OR Any Other Hosting Service
> Website : https://home.animedex.live
> Website : https://animedex.live
> Powered By TechZApi
Expand All @@ -34,7 +35,7 @@

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgit.luolix.top%2FTechShreyash%2FAnimeDex&env=API_KEY&envDescription=Your%20TechZ%20Api%20Key%2C%20Get%20from%20%40TechZApiBot%20on%20Telegram%20&envLink=https%3A%2F%2Ft.me%2FTechZApiBot&project-name=animedex&repository-name=AnimeDex&demo-title=AnimeDex&demo-description=Watch%20Animes%20Online%20For%20Free&demo-url=animedex.live&demo-image=https%3A%2F%2Fgit.luolix.top%2FTechShreyash%2FAnimeDex%2Fraw%2Fmain%2Fscreenshots%2Fhome.jpeg)

- Demo : https://home.animedex.live
- Demo : https://animedex.live

- Deploy To Repl.it

Expand All @@ -57,7 +58,7 @@
- Start The Website

```python3 main.py```
- Demo : https://home.animedex.live
- Demo : https://animedex.live

- Need Guide :
- https://docs.digitalocean.com/tutorials/app-deploy-flask-app/
Expand Down
57 changes: 39 additions & 18 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,46 @@ def get_episode(anime, episode):
ep_list = search.get("episodes")
data = TechZApi.gogo_episode(f"{anime}-episode-{episode}")

ep_list = get_eps_html2(ep_list)
btn_html = get_selector_btns(
f"/episode/{anime}/", int(episode), int(total_eps))
ep_html, iframe = episodeHtml(data, f"{anime} - Episode {episode}")

temp = render_template(
"episode_min.html",
title=f"{anime} - Episode {episode}",
heading=anime,
iframe=iframe,
)
if str(request.args.get("download", True)).lower() == "false":
dl = False
else:
dl = True

if str(request.args.get("selector", True)).lower() == "false":
btn_html = ""
else:
btn_html = get_selector_btns(f"/episode/{anime}/", int(episode), int(total_eps))

ep_html, iframe = episodeHtml(data, f"{anime} - Episode {episode}", dl=dl)

if str(request.args.get("embed", False)).lower() == "true":
temp = render_template(
"embed_min.html",
title=f"{anime} - Episode {episode}",
heading=anime,
iframe=iframe,
)

if str(request.args.get("eplist", False)).lower() == "true":
ep_list = get_eps_html2(ep_list)
temp = temp.replace(
"LISTHTML",
"<div class=divo><h2>List Of Episodes:</h2><div class=divo2>EPISOS</div></div>",
).replace("EPISOS", ep_list)
else:
temp = temp.replace("LISTHTML", "")

else:
ep_list = get_eps_html2(ep_list)
temp = render_template(
"episode_min.html",
title=f"{anime} - Episode {episode}",
heading=anime,
iframe=iframe,
).replace("EPISOS", ep_list)

update_watch(anime)
return (
temp.replace("PROSLO", btn_html)
.replace("SERVER", ep_html)
.replace("EPISOS", ep_list)
)
return temp.replace("PROSLO", btn_html).replace("SERVER", ep_html)


@app.route("/search", methods=["GET"])
Expand Down Expand Up @@ -219,8 +241,7 @@ def get_embed():
file = file.get("source_bk")[0].get("file")
else:
file = request.args.get("file")
except Exception as e:
print(e)
except:
file = request.args.get("file")
if not file:
return redirect(url)
Expand Down
57 changes: 39 additions & 18 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,46 @@ def get_episode(anime, episode):
ep_list = search.get("episodes")
data = TechZApi.gogo_episode(f"{anime}-episode-{episode}")

ep_list = get_eps_html2(ep_list)
btn_html = get_selector_btns(
f"/episode/{anime}/", int(episode), int(total_eps))
ep_html, iframe = episodeHtml(data, f"{anime} - Episode {episode}")

temp = render_template(
"episode_min.html",
title=f"{anime} - Episode {episode}",
heading=anime,
iframe=iframe,
)
if str(request.args.get("download", True)).lower() == "false":
dl = False
else:
dl = True

if str(request.args.get("selector", True)).lower() == "false":
btn_html = ""
else:
btn_html = get_selector_btns(f"/episode/{anime}/", int(episode), int(total_eps))

ep_html, iframe = episodeHtml(data, f"{anime} - Episode {episode}", dl=dl)

if str(request.args.get("embed", False)).lower() == "true":
temp = render_template(
"embed_min.html",
title=f"{anime} - Episode {episode}",
heading=anime,
iframe=iframe,
)

if str(request.args.get("eplist", False)).lower() == "true":
ep_list = get_eps_html2(ep_list)
temp = temp.replace(
"LISTHTML",
"<div class=divo><h2>List Of Episodes:</h2><div class=divo2>EPISOS</div></div>",
).replace("EPISOS", ep_list)
else:
temp = temp.replace("LISTHTML", "")

else:
ep_list = get_eps_html2(ep_list)
temp = render_template(
"episode_min.html",
title=f"{anime} - Episode {episode}",
heading=anime,
iframe=iframe,
).replace("EPISOS", ep_list)

update_watch(anime)
return (
temp.replace("PROSLO", btn_html)
.replace("SERVER", ep_html)
.replace("EPISOS", ep_list)
)
return temp.replace("PROSLO", btn_html).replace("SERVER", ep_html)


@app.route("/search", methods=["GET"])
Expand Down Expand Up @@ -219,8 +241,7 @@ def get_embed():
file = file.get("source_bk")[0].get("file")
else:
file = request.args.get("file")
except Exception as e:
print(e)
except:
file = request.args.get("file")
if not file:
return redirect(url)
Expand Down
92 changes: 92 additions & 0 deletions templates/embed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">

<head>
<link rel="icon" type="image/x-icon"
href="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/static/img/favicon.ico">
<title>Watch Episode {{ title }} - {{ heading }} - AnimeDex</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="title" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex">
<meta name="description"
content="Watch Episode {{ title }} - {{ heading }} - AnimeDex free anime online and it's latest episodes on AnimeDex. We provide free anime online experience without ads, signing up or downloading.">
<meta name="keywords"
content="{{ title }}, anime dex, hindi dub, hindi sub, english dub, watch anime online, free anime, anime stream, anime hd, english sub, kissanime, gogoanime, animeultima, 9anime, 123animes, animefreak, vidstreaming, gogo-stream, animekisa, zoro.to, gogoanime.run, animefrenzy, animekisa">
<meta name="charset" content="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<meta name="revisit-after" content="1 days">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Language" content="en">
<meta property="og:title" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex">
<meta property="og:description"
content="Watch Episode {{ title }} - {{ heading }} - AnimeDex free anime online and it's latest episodes on AnimeDex. We provide free anime online experience without ads, signing up or downloading.">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:site_name" content="AnimeDex">
<meta property="og:url" content="https://animedex.live/">
<meta itemprop="image" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg">
<meta property="og:image:secure_url"
content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg">
<meta property="og:image:width" content="650">
<meta property="og:image:height" content="350">
<meta property="twitter:title" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex">
<meta property="twitter:description"
content="Watch Episode {{ title }} - {{ heading }} - AnimeDex free anime online and it's latest episodes on AnimeDex. We provide free anime online experience without ads, signing up or downloading.">
<meta property="twitter:url" content="/anime/">
<meta property="twitter:card" content="summary">
<meta name="apple-mobile-web-app-status-bar" content="#202125">
<meta name="theme-color" content="#202125">
<link href="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/static/css/episode_min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all_min.css">
</head>

<body>
<section id="vid-sec">
<div id="vid-div">

<div id="video">
<iframe id="AnimeDexFrame" src="{{ iframe }}" style="border:0px #ffffff none;" scrolling="no"
frameborder="0" marginheight="0px" marginwidth="0px" allowfullscreen></iframe>

</div>

</div>

<div id="server_main">
<div class="status">
<div class="scontent">
You are watching <b>Episode {{ title }}</b>If current server doesn't work please try other servers
beside.
</div>
</div>

SERVER
</div>
</section>
<section id="watch">
<div class="selector link-data">
PROSLO
</div>
LISTHTML
</section>
<script>
function selectServer(btn) {
const buttons = document.getElementsByClassName('sobtn');
const iframe = document.getElementById('AnimeDexFrame');
iframe.src = btn.getAttribute('data-value');
for (let i = 0; i < buttons.length; i++) {
buttons[i].className = "sobtn";
}
btn.className = "sobtn sactive";
};

function showDownload() {
document.getElementById('showdl').style.display = "none";
document.getElementById('dldiv').classList.toggle('show');
}
</script>
</body>

</html>
1 change: 1 addition & 0 deletions templates/embed_min.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head> <link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/static/img/favicon.ico"> <title>Watch Episode {{ title }} - {{ heading }} - AnimeDex</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="title" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex"> <meta name="description" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex free anime online and it's latest episodes on AnimeDex. We provide free anime online experience without ads, signing up or downloading."> <meta name="keywords" content="{{ title }}, anime dex, hindi dub, hindi sub, english dub, watch anime online, free anime, anime stream, anime hd, english sub, kissanime, gogoanime, animeultima, 9anime, 123animes, animefreak, vidstreaming, gogo-stream, animekisa, zoro.to, gogoanime.run, animefrenzy, animekisa"> <meta name="charset" content="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"> <meta name="robots" content="index, follow"> <meta name="googlebot" content="index, follow"> <meta name="revisit-after" content="1 days"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="Content-Language" content="en"> <meta property="og:title" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex"> <meta property="og:description" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex free anime online and it's latest episodes on AnimeDex. We provide free anime online experience without ads, signing up or downloading."> <meta property="og:locale" content="en_US"> <meta property="og:type" content="website"> <meta property="og:site_name" content="AnimeDex"> <meta property="og:url" content="https://animedex.live/"> <meta itemprop="image" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg"> <meta property="og:image" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg"> <meta property="og:image:secure_url" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg"> <meta property="og:image:width" content="650"> <meta property="og:image:height" content="350"> <meta property="twitter:title" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex"> <meta property="twitter:description" content="Watch Episode {{ title }} - {{ heading }} - AnimeDex free anime online and it's latest episodes on AnimeDex. We provide free anime online experience without ads, signing up or downloading."> <meta property="twitter:url" content="/anime/"> <meta property="twitter:card" content="summary"> <meta name="apple-mobile-web-app-status-bar" content="#202125"> <meta name="theme-color" content="#202125"> <link href="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/static/css/episode_min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all_min.css"></head><body> <section id="vid-sec"> <div id="vid-div"> <div id="video"> <iframe id="AnimeDexFrame" src="{{ iframe }}" style="border:0px #ffffff none;" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" allowfullscreen></iframe> </div> </div> <div id="server_main"> <div class="status"> <div class="scontent"> You are watching <b>Episode {{ title }}</b>If current server doesn't work please try other servers beside. </div> </div> SERVER </div> </section> <section id="watch"> <div class="selector link-data"> PROSLO </div> LISTHTML </section> <script> function selectServer(btn) { const buttons = document.getElementsByClassName('sobtn'); const iframe = document.getElementById('AnimeDexFrame'); iframe.src = btn.getAttribute('data-value'); for (let i = 0; i < buttons.length; i++) { buttons[i].className = "sobtn"; } btn.className = "sobtn sactive"; }; function showDownload() { document.getElementById('showdl').style.display = "none"; document.getElementById('dldiv').classList.toggle('show'); } </script></body></html>
2 changes: 1 addition & 1 deletion templates/episode.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:site_name" content="AnimeDex">
<meta property="og:url" content="https://home.animedex.live/">
<meta property="og:url" content="https://animedex.live/">
<meta itemprop="image" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/TechShreyash/AnimeDex@main/screenshots/home.jpeg">
<meta property="og:image:secure_url"
Expand Down
Loading

0 comments on commit a2ca122

Please sign in to comment.