Compare commits
No commits in common. "60a2dcd73ffd36b12f7cde7150d875e466e75843" and "f3e0c6b374231f7f0d8dba1e23f42eac86f27250" have entirely different histories.
60a2dcd73f
...
f3e0c6b374
|
@ -14,7 +14,7 @@ defmodule Frenzy.Pipeline.Extractor.TheVerge do
|
||||||
|
|
||||||
content =
|
content =
|
||||||
html_tree
|
html_tree
|
||||||
|> Floki.find("main article > div:not(.duet--article--lede)")
|
|> Floki.find("article#content > div:not(.duet--article--lede)")
|
||||||
|> Floki.filter_out(
|
|> 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"
|
".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
|
||||||
end
|
end
|
||||||
|
|
||||||
defp rewrite({_tag, _attrs, children} = el) do
|
defp rewrite({tag, attrs, children} = el) do
|
||||||
cond do
|
cond do
|
||||||
is_empty_gif(el) ->
|
is_empty_gif(el) ->
|
||||||
nil
|
nil
|
||||||
|
|
|
@ -15,7 +15,7 @@ defmodule FrenzyWeb.LoginController do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def login_post(conn, %{"username" => username, "password" => password}) do
|
def login_post(conn, %{"username" => username, "password" => password} = params) do
|
||||||
user = Repo.get_by(User, username: username)
|
user = Repo.get_by(User, username: username)
|
||||||
|
|
||||||
case Bcrypt.check_pass(user, password) do
|
case Bcrypt.check_pass(user, password) do
|
||||||
|
@ -54,7 +54,7 @@ defmodule FrenzyWeb.LoginController do
|
||||||
case conn.assigns.user do
|
case conn.assigns.user do
|
||||||
%User{} = user ->
|
%User{} = user ->
|
||||||
changeset = User.set_oidc_subject_changeset(user, %{oidc_subject: subject})
|
changeset = User.set_oidc_subject_changeset(user, %{oidc_subject: subject})
|
||||||
{:ok, _user} = Repo.update(changeset)
|
{:ok, user} = Repo.update(changeset)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> put_flash(:info, "Successfully linked OIDC.")
|
|> put_flash(:info, "Successfully linked OIDC.")
|
||||||
|
|
|
@ -27,6 +27,11 @@ defmodule FrenzyWeb.ConfigureStage.ScrapeStageLive do
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@schema %{
|
||||||
|
"convert_to_data_uris" => :boolean,
|
||||||
|
"extractor" => :string
|
||||||
|
}
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def mount(socket) do
|
def mount(socket) do
|
||||||
{:ok, assign(socket, extractors: @extractors)}
|
{:ok, assign(socket, extractors: @extractors)}
|
||||||
|
|
Loading…
Reference in New Issue