Add extractor for beckyhansmeyer.com
This commit is contained in:
parent
d7641b1c28
commit
c0f04791b6
19
lib/frenzy/pipeline/extractor/becky_hansmeyer.ex
Normal file
19
lib/frenzy/pipeline/extractor/becky_hansmeyer.ex
Normal 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
|
Loading…
x
Reference in New Issue
Block a user