Lofter: support another theme and rewrite tests

This commit is contained in:
nonamethanks
2022-09-30 22:04:40 +02:00
parent 559bf1ae0a
commit 1d7caf703c
2 changed files with 50 additions and 59 deletions

View File

@@ -44,7 +44,13 @@ module Source
end
def artist_commentary_desc
page&.search(".ct .text, .content .text, .posts .photo .text").to_a.compact.first&.to_html
commentary_selectors = [
".ct .text",
".content .text",
".posts .photo .text",
"#post .description",
]
page&.search(commentary_selectors.join(", ")).to_a.compact.first&.to_html
end
def illust_id