Fix page caching

This commit is contained in:
2023-07-29 18:27:45 +10:00
parent 126dcc10b4
commit b389abf29d
4 changed files with 6 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ require "down"
module Adamantium
class PageCacher
def call(url:, &block)
tempfile = Down.download(bookmark.url)
tempfile = Down.download(url)
content = Readability::Document.new(tempfile.read, tags: %w[div section header p h1 h2 h3 h4 h5 h6 ol ul li table td tr thead tbody a code pre], attributes: %w[href]).content
yield content
end