Added manga-py source

This commit is contained in:
2019-12-14 22:33:14 -05:00
parent 9a4dd4b09b
commit 45067caea6
420 changed files with 18054 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
from .gomanga_co import GoMangaCo
class GMangaMe(GoMangaCo):
_name_re = '/mangas/([^/]+)'
_content_str = '{}/mangas/{}'
_chapters_selector = 'a.chapter-link'
def get_chapter_index(self) -> str:
selector = r'/mangas/[^/]+/(\d+/[^/]+)'
idx = self.re.search(selector, self.chapter).group(1)
return idx.replace('/', '-')
def _get_json_selector(self, content):
return r'1:\salphanumSort\((\[.+\])\)'
def get_cover(self) -> str:
image = self.re.search(r'"image"\s?:\s?"(.+)",', self.content)
if image:
return image.group(1)
main = GMangaMe