Rename Module -> Plugin with basic find/replace
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
defmodule Omnibot.Contrib.Linkbot do
|
||||
use Omnibot.Module
|
||||
use Omnibot.Plugin
|
||||
require Logger
|
||||
|
||||
@default_config timeout: 30_000
|
||||
@@ -19,9 +19,6 @@ defmodule Omnibot.Contrib.Linkbot do
|
||||
plug Tesla.Middleware.FollowRedirects, max_redirects: 10
|
||||
plug Tesla.Middleware.Compression, format: "gzip"
|
||||
|
||||
|
||||
@title_regex ~r"<title>(?<title>.+)</title>"i
|
||||
|
||||
def get_title(url) do
|
||||
# 1. check for "meta" tag (in the header) with a "property" attribute of "og:title", and fetch the "content" attribute of that tag
|
||||
# 2. check for meta tag with attribute "name" == "title", and fetch "content" attribute
|
||||
|
||||
Reference in New Issue
Block a user