Skip to content

Commit

Permalink
[yaplog] fix incomplete image URLs (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 9, 2019
1 parent a782b00 commit 93aac8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gallery_dl/extractor/yaplog.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def items(self):
for num, url in enumerate(urls, 1):
page = self.request(url).text if num > 1 else url
iurl = text.extract(page, '<img src="', '"')[0]
if iurl[0] == "/":
iurl = text.urljoin(self.root, iurl)
iid, _, ext = iurl.rpartition("/")[2].rpartition(".")
image = {
"url" : iurl,
Expand Down Expand Up @@ -101,6 +103,10 @@ class YaplogPostExtractor(YaplogExtractor):
"url": "896cae20fa718735a57e723c48544e830ff31345",
"keyword": "f8d8781e61c4c38238a7622d6df6c905f864e5d3",
}),
# complete image URLs (#443)
("https://yaplog.jp/msjane/archive/246", {
"pattern": r"https://yaplog.jp/cv/msjane/img/246/img\d+_t.jpg"
}),
# blog names with '-' (#443)
("https://yaplog.jp/a-pierrot-o/image/3946/22779"),
)
Expand Down

0 comments on commit 93aac8d

Please sign in to comment.