go-shiori / obelisk

Go package and CLI tool for saving web page as single HTML file
MIT License
249 stars 18 forks source link

Can not resolve the lazy load image #2

Closed waybackarchiver closed 2 years ago

waybackarchiver commented 4 years ago

Source: https://mp.weixin.qq.com/s/Xo78wOeoR6RArdcuREdHUQ

The lazy image block:

<img class="rich_pages" data-ratio="1.23875" data-s="300,640" data-src="https://mmbiz.qpic.cn/mmbiz_jpg/qfC4kOufBopzvshib8KowN41pKLiahBe0EmAd8vrevPlIIhDLv16b7F3AbUJBCTLo9Tt7zlx6AyvNoEpNiaZcpJ0g/640?wx_fmt=jpeg" data-type="jpeg" data-w="800" style="">

I suggest removing the dot before image format in the regex. https://github.com/go-shiori/obelisk/blob/e22fddd848248208c492cc804adba201af34b830/process-html.go#L17-L19

waybackarchiver commented 2 years ago

This issue should be resolved at https://github.com/go-shiori/obelisk/pull/10/commits/765a5cdee474d252d5a55da168d6639622a377d6