Add extractor for 512pixels.net
This commit is contained in:
parent
c0f04791b6
commit
957f271425
|
@ -0,0 +1,19 @@
|
|||
defmodule Frenzy.Pipeline.Extractor.FiveTwelvePixels do
|
||||
@moduledoc """
|
||||
Extractor for https://512pixels.net
|
||||
"""
|
||||
|
||||
alias Frenzy.Pipeline.Extractor
|
||||
@behaviour Extractor
|
||||
|
||||
@impl Extractor
|
||||
def extract(html_tree) do
|
||||
case Floki.find(html_tree, ".entry-content") do
|
||||
[content_elem | _] ->
|
||||
{:ok, content_elem}
|
||||
|
||||
_ ->
|
||||
{:error, "no matching elements"}
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue