From 2b8e0163e7e755d9c45a2cd6b8229c4bc2eaf85b Mon Sep 17 00:00:00 2001 From: Yoga Pranata Date: Fri, 11 Aug 2023 03:10:53 +0700 Subject: [PATCH 1/5] test --- wibuapi/wibuapi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wibuapi/wibuapi.py b/wibuapi/wibuapi.py index 9db1590..db1fb7c 100644 --- a/wibuapi/wibuapi.py +++ b/wibuapi/wibuapi.py @@ -314,8 +314,8 @@ def sukidesuost_search(self, query: str, page: int): def anilyrics_search(self, query: str): try: url = f"{self.base_url}/anime/lyrics/search?query={query}" - response = get(url, timeout=15).json() - return dumps(response, indent=2) + response = get(url, timeout=15) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -325,8 +325,8 @@ def anilyrics(self, link: str, type: str): """ try: url = f"{self.base_url}/anime/lyrics?link={link}&type={type}" - response = get(url, timeout=15).json() - return dumps(response, indent=2) + response = get(url, timeout=15) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" From 9a6c2f36fe19fe08be967c0cf9028da6b5b7ac18 Mon Sep 17 00:00:00 2001 From: Yoga Pranata Date: Wed, 16 Aug 2023 20:49:17 +0700 Subject: [PATCH 2/5] update - return a json response, not string (json.dumps) - add yumekomik --- wibuapi/wibuapi.py | 130 +++++++++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 59 deletions(-) diff --git a/wibuapi/wibuapi.py b/wibuapi/wibuapi.py index db1fb7c..f703ac9 100644 --- a/wibuapi/wibuapi.py +++ b/wibuapi/wibuapi.py @@ -1,7 +1,6 @@ # (c) 2022-2023 Yoga Pranata a.k.a zYxDevs # This file contains all api path from wibuapi. -from json import dumps from requests import get @@ -17,7 +16,7 @@ def lendrive(self, link: str): try: url = f"{self.base_url}/anime/lendrive?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -28,7 +27,7 @@ def donghua(self, link: str): try: url = f"{self.base_url}/anime/donghua?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -39,7 +38,7 @@ def anixlife(self, link: str): try: url = f"{self.base_url}/anime/anixlife?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -50,7 +49,7 @@ def kazefuri(self, link: str): try: url = f"{self.base_url}/anime/kazefuri?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -61,7 +60,7 @@ def anichin(self, link: str): try: url = f"{self.base_url}/anime/anichin?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -72,7 +71,7 @@ def nekopoi(self, link: str): try: url = f"{self.base_url}/anime/nekopoi?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -83,7 +82,7 @@ def hentaiguru(self, link: str): try: url = f"{self.base_url}/anime/hentaiguru?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -94,7 +93,7 @@ def kusonime(self, link: str): try: url = f"{self.base_url}/anime/kusonime?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -105,7 +104,7 @@ def doronime(self, link: str): try: url = f"{self.base_url}/anime/doronime?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -116,7 +115,7 @@ def samehadaku(self, link: str): try: url = f"{self.base_url}/anime/samehadaku?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -127,7 +126,7 @@ def kuramanime(self, link: str): try: url = f"{self.base_url}/anime/kuramanime?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -138,7 +137,7 @@ def moenime(self, link: str): try: url = f"{self.base_url}/anime/moenime?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -150,10 +149,23 @@ def rawkuma(self, link: str): try: url = f"{self.base_url}/manga/rawkuma?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response + except Exception as e: + return f"An error occured report on @YBotsSupport\n\n{e}" + + def yumekomik(self, link: str): + """works with list and single chapter + list: https://yumekomik.com/manga/watashi-yori-tsuyoi-otoko-to-kekkon-shitai-no/ + single: https://yumekomik.com/watashi-yori-tsuyoi-otoko-to-kekkon-shitai-no-chapter-08-bahasa-indonesia/ + """ + try: + url = f"{self.base_url}/manga/yumekomik?link={link}" + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" + def westmanga(self, link: str): """works with list and single chapter list: https://westmanga.info/manga/kaifuku-jutsushi-no-yarinaoshi/ @@ -162,7 +174,7 @@ def westmanga(self, link: str): try: url = f"{self.base_url}/manga/westmanga?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -174,7 +186,7 @@ def komikindo(self, link: str): try: url = f"{self.base_url}/manga/komikindo?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -186,7 +198,7 @@ def mangatale(self, link: str): try: url = f"{self.base_url}/manga/mangatale?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -198,7 +210,7 @@ def kiryuu(self, link: str): try: url = f"{self.base_url}/manga/kiryuu?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -210,7 +222,7 @@ def masterkomik(self, link: str): try: url = f"{self.base_url}/manga/masterkomik?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -222,7 +234,7 @@ def mangakita(self, link: str): try: url = f"{self.base_url}/manga/mangakita?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -234,7 +246,7 @@ def doujindesu(self, link: str): try: url = f"{self.base_url}/manga/doudesu?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -245,7 +257,7 @@ def crotpedia(self, link: str): try: url = f"{self.base_url}/manga/crotpedia?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -255,8 +267,8 @@ def wibusubs(self, link: str): """ try: url = f"{self.base_url}/drama/wibusubs?link={link}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -266,8 +278,8 @@ def adikfilm(self, link: str): """ try: url = f"{self.base_url}/film/adikfilm?link={link}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -275,7 +287,7 @@ def sukidesuost(self, link: str): try: url = f"{self.base_url}/music/sukidesuost?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -283,7 +295,7 @@ def hikarinoakari(self, link: str): try: url = f"{self.base_url}/music/hikarinoakari?link={link}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -291,7 +303,7 @@ def google(self, query: str): try: url = f"{self.base_url}/google/search?query={query}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -299,7 +311,7 @@ def lk21(self, query: str): try: url = f"{self.base_url}/lk21/search?title={query}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -307,14 +319,14 @@ def sukidesuost_search(self, query: str, page: int): try: url = f"{self.base_url}/music/sukidesuost/search?query={query}&page={page}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def anilyrics_search(self, query: str): try: url = f"{self.base_url}/anime/lyrics/search?query={query}" - response = get(url, timeout=15) + response = get(url, timeout=15).json() return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -325,7 +337,7 @@ def anilyrics(self, link: str, type: str): """ try: url = f"{self.base_url}/anime/lyrics?link={link}&type={type}" - response = get(url, timeout=15) + response = get(url, timeout=15).json() return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -337,48 +349,48 @@ def anipics(self, category: str, tags: str): """ try: url = f"{self.base_url}/anime/{category}/{tags}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def giUser(self, uid: int): try: url = f"{self.base_url}/game/gi/user?uid={uid}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def giWeapon(self, query: str): try: url = f"{self.base_url}/game/gi/weapon?name={query}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def giEnemy(self, query: str): try: url = f"{self.base_url}/game/gi/enemy?name={query}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def giElement(self, query: str): try: url = f"{self.base_url}/game/gi/element?name={query}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def giCharacter(self, query: str): try: url = f"{self.base_url}/game/gi/character?name={query}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -386,7 +398,7 @@ def giArtifact(self, query: str): try: url = f"{self.base_url}/game/gi/artifact?name={query}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -397,7 +409,7 @@ def brawlClub(self, tag: str): tag = tag.replace("#", "%23") url = f"{self.deprecated_url}/game/brawl/club?clubTag={tag}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -408,7 +420,7 @@ def brawlClubMember(self, tag: str): tag = tag.replace("#", "%23") url = f"{self.deprecated_url}/game/brawl/club/member?clubTag={tag}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -416,7 +428,7 @@ def brawlEvent(self): try: url = f"{self.deprecated_url}/game/brawl/event" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -427,7 +439,7 @@ def brawlPlayer(self, tag: str): tag = tag.replace("#", "%23") url = f"{self.deprecated_url}/game/brawl/player?playerTag={tag}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -438,7 +450,7 @@ def brawlPlayerLog(self, tag: str): tag = tag.replace("#", "%23") url = f"{self.deprecated_url}/game/brawl/player/log?playerTag={tag}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -446,7 +458,7 @@ def ud(self, query: str): try: url = f"{self.base_url}/etc/ud?query={query}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -457,7 +469,7 @@ def youtube(self, url: str): try: url = f"{self.base_url}/etc/youtube?url={url}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -465,7 +477,7 @@ def device(self, query: str): try: url = f"{self.base_url}/etc/gsm/search?query={query}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" @@ -473,22 +485,22 @@ def slug(self, query: str): try: url = f"{self.base_url}/etc/gsm/slug?query={query}" response = get(url, timeout=15).json() - return dumps(response, indent=2) + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def b64encode(self, query: str): try: url = f"{self.base_url}/encode/base64?query={query}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" def b64decode(self, query: str): try: url = f"{self.base_url}/decode/base64?query={query}" - response = get(url, timeout=5).json() - return dumps(response, indent=2) + response = get(url, timeout=15).json() + return response except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" From 78c01b46948dc639cae75ef1cc7fc680191b0b52 Mon Sep 17 00:00:00 2001 From: zYxDevs Date: Wed, 16 Aug 2023 13:49:40 +0000 Subject: [PATCH 3/5] Automated code formatting Signed-off-by: zYxDevs --- wibuapi/wibuapi.py | 1 - 1 file changed, 1 deletion(-) diff --git a/wibuapi/wibuapi.py b/wibuapi/wibuapi.py index f703ac9..0da4f9e 100644 --- a/wibuapi/wibuapi.py +++ b/wibuapi/wibuapi.py @@ -165,7 +165,6 @@ def yumekomik(self, link: str): except Exception as e: return f"An error occured report on @YBotsSupport\n\n{e}" - def westmanga(self, link: str): """works with list and single chapter list: https://westmanga.info/manga/kaifuku-jutsushi-no-yarinaoshi/ From c114635bb2045123377e9ce3ad41c3e847f75508 Mon Sep 17 00:00:00 2001 From: Yoga Pranata Date: Wed, 16 Aug 2023 20:59:34 +0700 Subject: [PATCH 4/5] Update README --- README.md | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5d506e3..6b2dd2f 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,23 @@ _There's many useful features in bot but it required big resource, so i make it **Paid Features:** - [x] All features on WibuAPI -- [x] LH Translation zipper -- [x] Shinigami zipper -- [x] Worldmanhwas zipper -- [x] Maid Manga zipper -- [x] Mangayaro zipper -- [x] Cosmicscans zipper -- [x] nHentai zipper -- [x] Sheakomik, Sheamanga zipper -- [x] Komikindo.info zipper -- [x] Mikoroku zipper -- [x] Mangakakalot zipper +- [x] LH Translation ziper +- [x] Shinigami ziper +- [x] Worldmanhwas ziper +- [x] Maid Manga ziper +- [x] Mangayaro ziper +- [x] Cosmicscans ziper +- [x] nHentai ziper +- [x] Sheakomik, Sheamanga ziper +- [x] Komikindo.info ziper +- [x] Mikoroku ziper +- [x] Mangakakalot ziper +- [x] OnlyWaifu ziper +- [x] Manhwatop ziper +- [x] Manhuafast ziper - [x] Onlylama - - [x] Download link sraper - - [x] Photo album zipper + - [x] Download link scraper + - [x] Photo album ziper - [x] Otomi Games - [x] Search parser - [x] Download link scraper @@ -185,6 +188,7 @@ print(res) | Website | Params | | :-: | :-: | | [Rawkuma](https://github.com/zYxDevs/wibu-api-py#rawkuma) | link | +| [Yumekomik](https://github.com/zYxDevs/wibu-api-py#yumekomik) | link | | [Westmanga](https://github.com/zYxDevs/wibu-api-py#westmanga) | link | | [Komikindo](https://github.com/zYxDevs/wibu-api-py#komikindo) | link | | [Mangatale](https://github.com/zYxDevs/wibu-api-py#mangatale) | link | @@ -204,6 +208,16 @@ res = api.rawkuma(url) print(res) ``` +#### [Yumekomik](https://yumekomik.com) +```python +# works with list and single chapter +# list: https://yumekomik.com/manga/watashi-yori-tsuyoi-otoko-to-kekkon-shitai-no/ +# single: https://yumekomik.com/watashi-yori-tsuyoi-otoko-to-kekkon-shitai-no-chapter-08-bahasa-indonesia/ +url = "https://yumekomik.com/manga/watashi-yori-tsuyoi-otoko-to-kekkon-shitai-no/" +res = api.yumekomik(url) +print(res) +``` + #### [Westmanga](https://westmanga.info) ```python # works with list and single chapter From b216be35bc4d0b7a647857f8db84da0b770fc285 Mon Sep 17 00:00:00 2001 From: Yoga Pranata Date: Wed, 16 Aug 2023 21:00:28 +0700 Subject: [PATCH 5/5] ok --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 96b0633..bb66cd5 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="wibuapi", - version="0.1.3", + version="0.1.4", description="Official Python Wrapper for Wibu API.", long_description=long_description, long_description_content_type="text/markdown",