[nijie] fix image URL for single image posts (#5049)

This commit is contained in:
Mike Fährmann
2024-01-10 23:27:10 +01:00
parent bbf96753e2
commit 2191e29e14
2 changed files with 10 additions and 1 deletions

View File

@@ -116,7 +116,8 @@ class NijieExtractor(AsynchronousMixin, BaseExtractor):
yield from text.extract_iter(
page, 'href="javascript:void(0);"><img src="', '"')
else:
yield text.extr(page, 'itemprop="image" src="', '"')
pos = page.find('id="view-center"') + 1
yield text.extract(page, 'itemprop="image" src="', '"', pos)[0]
@staticmethod
def _extract_user_name(page):