aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/rich_media
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-02-11 00:29:25 +0300
committerrinpatch <rinpatch@sdf.org>2020-02-11 16:17:21 +0300
commitea1631d7e67e22eb49d608e066ef4a3555bf25f7 (patch)
tree53e061abc3dfcc6bfa0f3024b443ac372eb7781c /lib/pleroma/web/rich_media
parent58299fcfb4c9f4ed63c2f791b6ebf9920ebb7659 (diff)
downloadpleroma-ea1631d7e67e22eb49d608e066ef4a3555bf25f7.tar.gz
Make Floki use fast_html
Diffstat (limited to 'lib/pleroma/web/rich_media')
-rw-r--r--lib/pleroma/web/rich_media/parser.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/rich_media/parser.ex b/lib/pleroma/web/rich_media/parser.ex
index c06b0a0f2..9702e90f1 100644
--- a/lib/pleroma/web/rich_media/parser.ex
+++ b/lib/pleroma/web/rich_media/parser.ex
@@ -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)}"}
+ {:error, "Parsing error: #{inspect(e)} #{inspect(__STACKTRACE__)}"}
end
end
- defp parse_html(html), do: Floki.parse(html)
+ defp parse_html(html), do: Floki.parse_document!(html)
defp maybe_parse(html) do
Enum.reduce_while(parsers(), %{}, fn parser, acc ->