0.0.1
This commit is contained in:
18
providers/coub.py
Normal file
18
providers/coub.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from .base import EmbedProvider
|
||||
|
||||
class CoubProvider(EmbedProvider):
|
||||
name = "coub"
|
||||
pattern = r"\{\{COUB:([A-Za-z0-9]+)\}\}"
|
||||
|
||||
def replace(self, match):
|
||||
coub_id = match.group(1)
|
||||
|
||||
embed_html = f'''
|
||||
<iframe src="https://coub.com/embed/{coub_id}"
|
||||
width="640"
|
||||
height="480"
|
||||
frameborder="0"
|
||||
allowfullscreen>
|
||||
</iframe>
|
||||
'''
|
||||
return self.wrap_template("coub", embed_html)
|
||||
Reference in New Issue
Block a user