Lofter: add support for another theme

This commit is contained in:
nonamethanks
2021-07-12 19:07:52 +02:00
committed by evazion
parent 716b9a5b88
commit bb4bdefc23
2 changed files with 11 additions and 6 deletions

View File

@@ -11,6 +11,7 @@
#
# * https://gengar563.lofter.com/post/1e82da8c_1c98dae1b
# * https://yuli031458.lofter.com/post/3163d871_1cbdc5f6d (different theme/css selectors)
# * https://ssucrose.lofter.com/post/1d30f3e4_1cc58e9f0 (another different theme)
#
# Profile URLs
#
@@ -46,7 +47,7 @@ module Sources
end
def image_urls
images = page&.search(".pic img, .content img")
images = page&.search(".imgclasstag img")
images.to_a.map { |img| get_full_version(img["src"]) }
end
@@ -74,7 +75,7 @@ module Sources
end
def tags
tags = page&.search(".info .tag, .main .tag a")
tags = page&.search(".info .tag, .main .tag a, .tagarea")
tags.to_a.map do |tag|
[tag.text, tag.attr("href")]