diff options
author | lain <lain@soykaf.club> | 2020-02-11 13:22:35 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-02-11 13:22:35 +0000 |
commit | 3fee859b60d2b97e8210faf872a03d99cfc574cc (patch) | |
tree | 53e061abc3dfcc6bfa0f3024b443ac372eb7781c /lib/pleroma/web/rich_media | |
parent | 335cbe2e1bccd6e5bc64d7c10f2321844a7ee715 (diff) | |
parent | ea1631d7e67e22eb49d608e066ef4a3555bf25f7 (diff) | |
download | pleroma-3fee859b60d2b97e8210faf872a03d99cfc574cc.tar.gz |
Merge branch 'feat/floki-fasthtml' into 'develop'
Make Floki use fast_html
See merge request pleroma/pleroma!2194
Diffstat (limited to 'lib/pleroma/web/rich_media')
-rw-r--r-- | lib/pleroma/web/rich_media/parser.ex | 6 |
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 -> |