[myhentaigallery] handle whitespace before the title tag
This commit is contained in:
@@ -44,7 +44,10 @@ class MyhentaigalleryGalleryExtractor(GalleryExtractor):
|
|||||||
extr = text.extract_from(page)
|
extr = text.extract_from(page)
|
||||||
split = text.split_html
|
split = text.split_html
|
||||||
|
|
||||||
title = extr('<div class="comic-description">\n<h1>', '</h1>')
|
title = extr('<div class="comic-description">\n', '</h1>').lstrip()
|
||||||
|
if title.startswith("<h1>"):
|
||||||
|
title = title[len("<h1>"):]
|
||||||
|
|
||||||
if not title:
|
if not title:
|
||||||
raise exception.NotFoundError("gallery")
|
raise exception.NotFoundError("gallery")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user