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

Commit

Permalink
Update gogo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
TechShreyash committed Nov 12, 2022
1 parent 0341864 commit 6c64fcb
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions programs/gogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,42 @@ def anime(self, anime):
f'https://{self.host}/category/'+anime).content, 'html.parser')
title = soup.find('h1').text
types = soup.find_all('p', 'type')
synopsis = types[1].text.replace('Plot Summary: ', '').strip()
names = types[5].text.replace('Other name: ', '').strip()
try:
synopsis = types[1].text.replace('Plot Summary: ', '').strip()
except:
synopsis = '?'
try:
names = types[5].text.replace('Other name: ', '').strip()
except:
names = '?'
studios = '?'
ep = soup.find('a', 'active').get('ep_end')
try:
ep = soup.find('a', 'active').get('ep_end')
except:
ep = '?'
episodes = int(ep.strip())
genres = types[2].text.replace('Genre: ', '').strip().split(',')
try:
genres = types[2].text.replace('Genre: ', '').strip().split(',')
except:
genres = '?'
img = soup.find('div', 'anime_info_body_bg').find('img').get('src')
if 'dub' in anime.lower():
dub = 'DUB'
else:
dub = 'SUB'
year = types[3].text.replace('Released: ', '').strip()
typo = types[0].text.replace('Type: ', '').strip()
try:
year = types[3].text.replace('Released: ', '').strip()
except:
year = '?'
try:
typo = types[0].text.replace('Type: ', '').strip()
except:
typo = '?'
season = typo
status = types[4].text.replace('Status: ', '').strip()
try:
status = types[4].text.replace('Status: ', '').strip()
except:
status = '?'

return (title, synopsis, names, studios, episodes, genres, img, dub, season, year, typo, status)

Expand Down

1 comment on commit 6c64fcb

@vercel
Copy link

@vercel vercel bot commented on 6c64fcb Nov 12, 2022

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-techshreyash.vercel.app
anime-dex-git-main-techshreyash.vercel.app

Please sign in to comment.