mangaeden_com provider http->api
@@ -6,18 +6,17 @@ class MangaEdenCom(Provider, Std):
uriRegex = r'/([^/]+)/[^/]+-manga/([^/]+)/?'
apiUri = '{}/api/{}/{}/' # (domain, chapter|manga,
__lang = 'en'
- __cdn_url = 'https://cdn.mangaeden.com/mangasimg/{}'
+ __cdn_url = 'https://cdn.mangaeden.com/mangasimg/'
def get_archive_name(self) -> str:
idx = self.get_chapter_index().split('-')
return self.normal_arc_name(idx)
def get_chapter_index(self) -> str:
- idx = self.re.search(r'-manga/[^/]+/(\d+)', self.chapter).group(1)
- return '{}-0'.format(idx)
+ return str(self.chapter[0]).replace('.', '-')
def get_main_content(self):
- return self.http_get('{domain}/{lang}/{lang}/{name}/'.format(
+ return self.http_get('{domain}/{lang}/{lang}-manga/{name}/'.format(
domain=self.domain,
lang=self.__lang,
name=self.manga_name,
@@ -29,7 +28,7 @@ class MangaEdenCom(Provider, Std):
return re.group(2)
def get_chapters(self): # issue #61
- manga_idx = self.re.search('window.manga_id2 ?= ?".+?";', self.content).group(1)
+ manga_idx = self.re.search(r'.manga_id2\s?=\s?"(.+?)";', self.content).group(1)
return self.json.loads(self.http_get(self.apiUri.format(
self.domain,
'manga',
@@ -42,8 +41,7 @@ class MangaEdenCom(Provider, Std):
'chapter',
self.chapter[3]
))).get('images', [])
- print(items);exit()
- return [self.__cdn_url + i for i in items[1]]
+ return [self.__cdn_url + i[1] for i in items]
def get_cover(self) -> str:
return self._cover_from_content('#rightContent .info img')
