replace 'text.extract()' with 'text.extr()' where possible

This commit is contained in:
Mike Fährmann
2022-11-04 23:39:38 +01:00
parent eb33e6cf2d
commit b0cb4a1b9c
79 changed files with 199 additions and 202 deletions

View File

@@ -41,7 +41,7 @@ class ImgthGalleryExtractor(Extractor):
"""Yield all image urls for this gallery"""
pnum = 0
while True:
thumbs = text.extract(page, '<ul class="thumbnails">', '</ul>')[0]
thumbs = text.extr(page, '<ul class="thumbnails">', '</ul>')
for url in text.extract_iter(thumbs, '<img src="', '"'):
yield "https://imgth.com/images" + url[24:]
if '<li class="next">' not in page: