Keep matching mainline as much as possible
This commit is contained in:
parent
94153792ba
commit
4bc60b2b79
17 changed files with 3 additions and 128 deletions
|
|
@ -302,11 +302,6 @@ class LinkDetailsExtractor
|
|||
nil
|
||||
end
|
||||
|
||||
def detect_encoding
|
||||
guess = detector.detect(@html, @html_charset)
|
||||
guess&.fetch(:confidence, 0).to_i > 60 ? guess&.fetch(:encoding, nil) : nil
|
||||
end
|
||||
|
||||
def detector
|
||||
@detector ||= CharlockHolmes::EncodingDetector.new.tap do |detector|
|
||||
detector.strip_tags = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue