FIX: Improve Onebox detection (#8019)

Follow-up to 7c83d2eeb2.
This commit is contained in:
Bianca Nenciu
2019-09-10 13:59:48 +03:00
committed by GitHub
parent ddd45d1419
commit 0d22beb81d
4 changed files with 9 additions and 5 deletions

View File

@@ -28,7 +28,7 @@ class CookedPostProcessor
@cooking_options = @cooking_options.symbolize_keys
@doc = Nokogiri::HTML::fragment(post.cook(post.raw, @cooking_options))
@has_oneboxes = @doc.css("aside.onebox").count > 0
@has_oneboxes = post.post_analyzer.found_oneboxes?
@size_cache = {}
@disable_loading_image = !!opts[:disable_loading_image]