python-markdown-oembed/mdx_oembed/endpoints.py

31 lines
723 B
Python
Raw Normal View History

2012-11-13 21:28:10 +00:00
# -*- coding: utf-8 -*-
import oembed
2021-12-08 14:07:57 +00:00
YOUTUBE = oembed.OEmbedEndpoint('https://www.youtube.com/oembed', [
'https?://(*.)?youtube.com/*',
'https?://youtu.be/*',
])
2012-11-13 21:28:10 +00:00
SLIDESHARE = oembed.OEmbedEndpoint('http://www.slideshare.net/api/oembed/2', [
'http://www.slideshare.net/*/*',
2016-04-14 03:23:55 +00:00
'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/*',
])
2022-08-02 12:13:40 +00:00
VIMEO = oembed.OEmbedEndpoint('https://vimeo.com/api/oembed.json', [
'https?://vimeo.com/*',
])
DEFAULT_ENDPOINTS = [
YOUTUBE,
FLICKR,
VIMEO,
SLIDESHARE
2015-04-21 09:23:39 +00:00
]