Improve rich media parsers

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-01-18 12:52:45 +01:00
parent a66f19cc5d
commit 2134e7b152
6 changed files with 16 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ defmodule Mobilizon.Service.RichMedia.Parsers.Fallback do
defp get_page(html, :title) do
html
|> Floki.parse_document!()
|> Floki.find("html title")
|> Floki.find("title")
|> List.first()
|> Floki.text()
|> String.trim()