Compare commits
2 Commits
f3e0c6b374
...
60a2dcd73f
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 60a2dcd73f | |
Shadowfacts | 3e6211c9ba |
|
@ -14,7 +14,7 @@ defmodule Frenzy.Pipeline.Extractor.TheVerge do
|
||||||
|
|
||||||
content =
|
content =
|
||||||
html_tree
|
html_tree
|
||||||
|> Floki.find("article#content > div:not(.duet--article--lede)")
|
|> Floki.find("main article > 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} = params) do
|
def login_post(conn, %{"username" => username, "password" => password}) 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,11 +27,6 @@ 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