Lofter: support another theme

Fixes #5334.
This commit is contained in:
nonamethanks
2022-11-06 00:03:15 +01:00
parent c1623f3fcc
commit 9f3f302328
2 changed files with 12 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ module Source
".content .text",
".posts .photo .text",
"#post .description",
".m-post .cont .text",
]
page&.search(commentary_selectors.join(", ")).to_a.compact.first&.to_html
end

View File

@@ -47,6 +47,17 @@ module Sources
)
end
context "A lofter post with commentary under <.m-post .cont .text>" do
strategy_should_work(
"https://qiuchenghanshuang.lofter.com/post/1f9d6464_2b736607b",
image_urls: [
"https://imglf4.lf127.net/img/68d1578576f2e8a0/akFYeFo0L0VFMno5d0JuNHlwQ3VMdEFxYysyN1ZseVduNzFkbG9MdUlFVT0.jpg",
"https://imglf6.lf127.net/img/9970d5715bd5f72a/akFYeFo0L0VFMno5d0JuNHlwQ3VMZ3QxbkttTHpHZERWZXlVS3FDNmtYcz0.jpg",
],
dtext_artist_commentary_desc: /过去与她擦肩而过/
)
end
context "A dead link" do
strategy_should_work(
"https://gxszdddd.lofter.com/post/322595b1_1ca5e6f66",