Add extractor for beckyhansmeyer.com

This commit is contained in:
Shadowfacts 2019-10-31 17:46:32 -04:00
parent d7641b1c28
commit c0f04791b6
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
defmodule Frenzy.Pipeline.Extractor.BeckyHansmeyer do
@moduledoc """
Extractor for https://beckyhansmeyer.com
"""
alias Frenzy.Pipeline.Extractor
@behaviour Extractor
@impl Extractor
def extract(html_tree) do
case Floki.find(html_tree, "div.entry-content") do
[content_elem | _] ->
{:ok, content_elem}
_ ->
{:error, "no matching elements"}
end
end
end