1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

[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
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
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):

View File

@ -157,6 +157,14 @@ __tests__ = (
"user_name" : "黒川 竜",
},
{
"#url" : "https://nijie.info/view.php?id=37078",
"#comment" : "'view_side_dojin' thumbnails (#5049)",
"#category": ("Nijie", "nijie", "image"),
"#class" : nijie.NijieImageExtractor,
"#urls" : "https://pic.nijie.net/03/nijie/13/98/498/illust/0_0_703023d18ca8d058_bca943.jpg",
},
{
"#url" : "https://nijie.info/view.php?id=70724",
"#category": ("Nijie", "nijie", "image"),