[mangapark] fix manga extraction ... again

server
Mike Fährmann 6 years ago
parent 28f9539551
commit f9ace0f4a3
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -63,19 +63,13 @@ class MangaparkMangaExtractor(MangaparkExtractor, MangaExtractor):
for stream in page.split('<div id="stream_')[1:]: for stream in page.split('<div id="stream_')[1:]:
data["stream"] = text.parse_int(text.extract(stream, '', '"')[0]) data["stream"] = text.parse_int(text.extract(stream, '', '"')[0])
pos = 0 for chapter in text.extract_iter(stream, '<li ', '</li>'):
while True: path , pos = text.extract(chapter, 'href="', '"')
test, pos = text.extract( title, pos = text.extract(chapter, '>: </span>', '<', pos)
stream, '<a class="ml-1 visited ch', '', pos) count, pos = text.extract(chapter, ' of ', ' ', pos)
if test is None:
break
path , pos = text.extract(stream, 'href="', '"', pos)
title, pos = text.extract(stream, '</a>', '</div>', pos)
count, pos = text.extract(stream, ' of ', ' ', pos)
self.parse_chapter_path(path[8:], data) self.parse_chapter_path(path[8:], data)
data["title"] = title.strip()[2:] data["title"] = title.strip() if title else ""
data["count"] = text.parse_int(count) data["count"] = text.parse_int(count)
results.append((self.root + path, data.copy())) results.append((self.root + path, data.copy()))

Loading…
Cancel
Save