[nijie] fix image URLs for single image posts (#5842)

fixes regression introduced in 2e11b6e7
This commit is contained in:
Mike Fährmann
2024-07-10 15:00:03 +02:00
parent eb3ef13d28
commit 16e276fca4

View File

@@ -120,7 +120,8 @@ class NijieExtractor(AsynchronousMixin, BaseExtractor):
]
else:
pos = page.find('id="view-center"') + 1
return (text.extr(page, 'itemprop="image" src="', '"', pos),)
# do NOT use text.extr() here, as it doesn't support a pos argument
return (text.extract(page, 'itemprop="image" src="', '"', pos)[0],)
@staticmethod
def _extract_user_name(page):