Revert "Merge branch 'feat/floki-fasthtml' into 'develop'"

This reverts merge request !2194
This commit is contained in:
feld 2020-02-11 16:55:18 +00:00
commit 237b2068f9
9 changed files with 18 additions and 35 deletions

View file

@ -81,18 +81,18 @@ defmodule Pleroma.Web.RichMedia.Parser do
{:ok, %Tesla.Env{body: html}} = Pleroma.HTTP.get(url, [], adapter: @hackney_options)
html
|> parse_html()
|> parse_html
|> maybe_parse()
|> Map.put(:url, url)
|> clean_parsed_data()
|> check_parsed_data()
rescue
e ->
{:error, "Parsing error: #{inspect(e)} #{inspect(__STACKTRACE__)}"}
{:error, "Parsing error: #{inspect(e)}"}
end
end
defp parse_html(html), do: Floki.parse_document!(html)
defp parse_html(html), do: Floki.parse(html)
defp maybe_parse(html) do
Enum.reduce_while(parsers(), %{}, fn parser, acc ->