1 from manga_py
.provider
import Provider
2 from .helpers
.std
import Std
5 class ZingBoxMe(Provider
, Std
):
7 def get_archive_name(self
) -> str:
8 idx
= self
.get_chapter_index()
9 return self
.normal_arc_name(idx
)
11 def get_chapter_index(self
) -> str:
12 return str(self
.chapter
.get('title', '0'))
14 def get_content(self
):
15 idx
= self
.re
.search(r
'/manga/(?:[^/]+/)?(\d+)/', self
.get_url())
17 'url': '/manga/getBookDetail/{}'.format(idx
.group(1)),
19 'api': '/mangaheatapi/web',
21 with self
.http().post(self
.domain
+ '/api', data
=data
) as resp
:
24 def get_manga_name(self
) -> str:
25 return self
._get
_name
(r
'\.\w{2,7}/manga/(?:\d+/)?([^/]+)')
27 def get_chapters(self
):
28 return self
.content
.get('child', [])
30 def _chapter_url(self
):
31 idx
= self
.chapter
.get('chapterId', 0)
32 return '/manga/getChapterImages/{}'.format(idx
)
36 'url': self
._chapter
_url
(),
38 'api': '/mangaheatapi/web',
40 with self
.http().post(self
.domain
+ '/api', data
=data
) as resp
:
41 return resp
.json().get('images', [])
44 return self
._cover
_from
_content
('.comicImg img')
46 def chapter_for_json(self
):
47 return self
._chapter
_url
()