Compare commits

...

2 Commits

Author SHA1 Message Date
Shadowfacts 60a2dcd73f Fix Verge extractor failing for features 2023-12-03 21:30:52 -05:00
Shadowfacts 3e6211c9ba Fix unused binding warnings 2023-12-03 21:28:24 -05:00
3 changed files with 4 additions and 9 deletions

View File

@ -14,7 +14,7 @@ defmodule Frenzy.Pipeline.Extractor.TheVerge do
content =
html_tree
|> Floki.find("article#content > div:not(.duet--article--lede)")
|> Floki.find("main article > div:not(.duet--article--lede)")
|> Floki.filter_out(
".hidden, .duet--layout--rail, .duet--article--article-pullquote, .duet--article--comments-join-the-conversation, .duet--recirculation--related-list, .duet--article--comments-button, .duet--article--share-buttons"
)
@ -57,7 +57,7 @@ defmodule Frenzy.Pipeline.Extractor.TheVerge do
end
end
defp rewrite({tag, attrs, children} = el) do
defp rewrite({_tag, _attrs, children} = el) do
cond do
is_empty_gif(el) ->
nil

View File

@ -15,7 +15,7 @@ defmodule FrenzyWeb.LoginController do
})
end
def login_post(conn, %{"username" => username, "password" => password} = params) do
def login_post(conn, %{"username" => username, "password" => password}) do
user = Repo.get_by(User, username: username)
case Bcrypt.check_pass(user, password) do
@ -54,7 +54,7 @@ defmodule FrenzyWeb.LoginController do
case conn.assigns.user do
%User{} = user ->
changeset = User.set_oidc_subject_changeset(user, %{oidc_subject: subject})
{:ok, user} = Repo.update(changeset)
{:ok, _user} = Repo.update(changeset)
conn
|> put_flash(:info, "Successfully linked OIDC.")

View File

@ -27,11 +27,6 @@ defmodule FrenzyWeb.ConfigureStage.ScrapeStageLive do
}
end)
@schema %{
"convert_to_data_uris" => :boolean,
"extractor" => :string
}
@impl true
def mount(socket) do
{:ok, assign(socket, extractors: @extractors)}