diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-17 13:55:51 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-17 13:55:51 +0530 |
commit | 1e5ba86fcf01c87b3dfc1ecf35279955301cf4c8 (patch) | |
tree | 0f209d1b197ccdbf4c0ecf1b6add3fba0bbacb8b /henti.py | |
parent | 2a1a1aa395c623f7c18c1591902c877028710060 (diff) |
major 'performance tweaks' in henti.py
Diffstat (limited to 'henti.py')
-rw-r--r-- | henti.py | 32 |
1 files changed, 28 insertions, 4 deletions
@@ -1,7 +1,31 @@ from hentai import Hentai from hentai import Format -def get_title(sauce): - # get hentai title in readable format - henti_title = str(Hentai(sauce).title(Format.Pretty)) - return henti_title +class Numbers: + def __init__(self, number): + self.sauce = Hentai(number) + + def title(self): + title = self.sauce.title(Format.Pretty) + return title +""" + def artist(self): + artist = str(Hentai(sauce).artist).split(', ')[2] # name='artist' + name = artist[6:-1] # just the artist's name + return name + + def tags(): + # get a henti's tags + pass + + def get_title(sauce): + # get hentai title in readable format + title = str(Hentai(sauce).title(Format.Pretty)) + artist = get_artist(sauce) + r = "{title} ({sauce}) by {artist}\nhttps://nhentai.net/g/{sauce}/".format(title=title, artist=artist, sauce=sauce) + return r +""" +# print(Numbers(177013).title()) +# print(Numbers.title(177013)) +# print(Numbers.title(177013)) +# print(x.title()) |