Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.

Commit f5ab9bb

Browse files
committed
fix anime details func
1 parent 8b60947 commit f5ab9bb

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

pynimeapi/pynime.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, base_url: str = "https://anitaku.to"):
2323
self.baseURL = base_url # domain of GoGoAnime. please update regularly
2424

2525
def version(self):
26-
return "0.1.60"
26+
return "0.1.61"
2727

2828
def search_anime(self, anime_title: str) -> SearchResultObj:
2929
"""
@@ -75,18 +75,17 @@ def get_anime_details(self, anime_category_url: str) -> AnimeDetailsObj:
7575

7676
title = info_body.find("h1").text.strip()
7777
season = other_info[0].text.replace("\n", "").replace("Type: ", "")
78-
synopsis = other_info[1].text.replace("\n", "")
79-
80-
# look for genres
81-
# Anitaku not giving anime genres detail.
8278

83-
# genres = [] # empty list
84-
# pattern_genres = re.compile(r'Genre:\s*(.*)$')
85-
# match_genres = pattern_genres.search(other_info[3].text.replace("\n", ""))
86-
87-
# if match_genres:
88-
# genres = match_genres.group(1).split(', ')
79+
# find description/synopsis
80+
synopsis = info_body.find("div", {"class":"description"}).text.replace("\n","").replace("\r","")
81+
82+
# look for genres
83+
genres = [] # empty list
84+
pattern_genres = re.compile(r'Genre:\s*(.*)$')
85+
match_genres = pattern_genres.search(other_info[2].text.replace("\n", ""))
8986

87+
if match_genres:
88+
genres = match_genres.group(1).split(', ')
9089

9190
status = other_info[4].text.replace("\n", "").replace("Status: ", "")
9291
image_url = image_url

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pynimeapi"
3-
version = "0.1.60"
3+
version = "0.1.61"
44
description = "Yet simple API wrapper for GoGoAnime"
55
authors = ["Yoshkuni Kuniumi <[email protected]>"]
66
license = "GNU General Public License v3.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
VERSION = '0.1.60'
3+
VERSION = '0.1.61'
44
DESCRIPTION = 'Yet simple API wrapper for GoGoAnime'
55
LONG_DESCRIPTION = 'PyNime is a (simple) straightforward Python3 script to scrape GoGoAnime using Python. The project ' \
66
'is a work in progress, not finished yet. But, the code works well, feel free to take part of the ' \

0 commit comments

Comments
 (0)