Add extractor for 512pixels.net

This commit is contained in:
Shadowfacts 2019-10-31 18:38:01 -04:00
parent c0f04791b6
commit 957f271425
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.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