mirror of
https://github.com/Hopiu/python-markdown-oembed.git
synced 2026-03-17 06:20:24 +00:00
30 lines
722 B
Python
30 lines
722 B
Python
# -*- coding: utf-8 -*-
|
|
import oembed
|
|
|
|
YOUTUBE = oembed.OEmbedEndpoint('https://www.youtube.com/oembed', [
|
|
'https?://(*.)?youtube.com/*',
|
|
'https?://youtu.be/*',
|
|
])
|
|
|
|
SLIDESHARE = oembed.OEmbedEndpoint('http://www.slideshare.net/api/oembed/2', [
|
|
'http://www.slideshare.net/*/*',
|
|
'http://fr.slideshare.net/*/*',
|
|
'http://de.slideshare.net/*/*',
|
|
'http://es.slideshare.net/*/*',
|
|
'http://pt.slideshare.net/*/*',
|
|
])
|
|
|
|
FLICKR = oembed.OEmbedEndpoint('http://www.flickr.com/services/oembed/', [
|
|
'https?://*.flickr.com/*',
|
|
])
|
|
|
|
VIMEO = oembed.OEmbedEndpoint('http://vimeo.com/api/oembed.json', [
|
|
'https?://vimeo.com/*',
|
|
])
|
|
|
|
DEFAULT_ENDPOINTS = [
|
|
YOUTUBE,
|
|
FLICKR,
|
|
VIMEO,
|
|
SLIDESHARE
|
|
]
|